Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: content/renderer/accessibility/renderer_accessibility_browsertest.cc

Issue 339573003: NavigationTiming: set navigationStart for navigations in new tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update browsertests. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "base/time/time.h"
6 #include "content/common/frame_messages.h" 7 #include "content/common/frame_messages.h"
7 #include "content/common/view_message_enums.h" 8 #include "content/common/view_message_enums.h"
8 #include "content/public/test/render_view_test.h" 9 #include "content/public/test/render_view_test.h"
9 #include "content/renderer/accessibility/renderer_accessibility_complete.h" 10 #include "content/renderer/accessibility/renderer_accessibility_complete.h"
10 #include "content/renderer/render_view_impl.h" 11 #include "content/renderer/render_view_impl.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/public/platform/WebSize.h" 13 #include "third_party/WebKit/public/platform/WebSize.h"
13 #include "third_party/WebKit/public/web/WebAXObject.h" 14 #include "third_party/WebKit/public/web/WebAXObject.h"
14 #include "third_party/WebKit/public/web/WebDocument.h" 15 #include "third_party/WebKit/public/web/WebDocument.h"
15 #include "third_party/WebKit/public/web/WebView.h" 16 #include "third_party/WebKit/public/web/WebView.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // because the element it was referring to no longer exists, 334 // because the element it was referring to no longer exists,
334 // so the event here is from loading this new page. 335 // so the event here is from loading this new page.
335 FrameMsg_Navigate_Params nav_params; 336 FrameMsg_Navigate_Params nav_params;
336 nav_params.url = GURL("data:text/html,<p>Hello, again.</p>"); 337 nav_params.url = GURL("data:text/html,<p>Hello, again.</p>");
337 nav_params.navigation_type = FrameMsg_Navigate_Type::NORMAL; 338 nav_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
338 nav_params.transition = PAGE_TRANSITION_TYPED; 339 nav_params.transition = PAGE_TRANSITION_TYPED;
339 nav_params.current_history_list_length = 1; 340 nav_params.current_history_list_length = 1;
340 nav_params.current_history_list_offset = 0; 341 nav_params.current_history_list_offset = 0;
341 nav_params.pending_history_list_offset = 1; 342 nav_params.pending_history_list_offset = 1;
342 nav_params.page_id = -1; 343 nav_params.page_id = -1;
344 nav_params.browser_navigation_start = base::TimeTicks::FromInternalValue(1);
343 frame()->OnNavigate(nav_params); 345 frame()->OnNavigate(nav_params);
344 accessibility->SendPendingAccessibilityEvents(); 346 accessibility->SendPendingAccessibilityEvents();
345 EXPECT_TRUE(sink_->GetUniqueMessageMatching( 347 EXPECT_TRUE(sink_->GetUniqueMessageMatching(
346 AccessibilityHostMsg_Events::ID)); 348 AccessibilityHostMsg_Events::ID));
347 } 349 }
348 350
349 TEST_F(RendererAccessibilityTest, HideAccessibilityObject) { 351 TEST_F(RendererAccessibilityTest, HideAccessibilityObject) {
350 // Test RendererAccessibilityComplete and make sure it sends the 352 // Test RendererAccessibilityComplete and make sure it sends the
351 // proper event to the browser when an object in the tree 353 // proper event to the browser when an object in the tree
352 // is hidden, but its children are not. 354 // is hidden, but its children are not.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 547
546 const IPC::Message* message = 548 const IPC::Message* message =
547 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID); 549 sink_->GetUniqueMessageMatching(AccessibilityHostMsg_Events::ID);
548 ASSERT_TRUE(message); 550 ASSERT_TRUE(message);
549 Tuple1<std::vector<AccessibilityHostMsg_EventParams> > param; 551 Tuple1<std::vector<AccessibilityHostMsg_EventParams> > param;
550 AccessibilityHostMsg_Events::Read(message, &param); 552 AccessibilityHostMsg_Events::Read(message, &param);
551 ASSERT_EQ(0U, param.a.size()); 553 ASSERT_EQ(0U, param.a.size());
552 } 554 }
553 555
554 } // namespace content 556 } // namespace content
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698