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

Side by Side Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 2657323003: Convert HistoryTabHelper to use the new navigation callbacks. (Closed)
Patch Set: nit Created 3 years, 10 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/common/frame_messages.h » ('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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Did we get the expected message? 427 // Did we get the expected message?
428 EXPECT_TRUE(process()->sink().GetFirstMessageMatching( 428 EXPECT_TRUE(process()->sink().GetFirstMessageMatching(
429 FrameMsg_EnableViewSourceMode::ID)); 429 FrameMsg_EnableViewSourceMode::ID));
430 430
431 FrameHostMsg_DidCommitProvisionalLoad_Params params; 431 FrameHostMsg_DidCommitProvisionalLoad_Params params;
432 InitNavigateParams(&params, entry_id, true, kRewrittenURL, 432 InitNavigateParams(&params, entry_id, true, kRewrittenURL,
433 ui::PAGE_TRANSITION_TYPED); 433 ui::PAGE_TRANSITION_TYPED);
434 main_test_rfh()->PrepareForCommit(); 434 main_test_rfh()->PrepareForCommit();
435 main_test_rfh()->OnMessageReceived( 435 main_test_rfh()->OnMessageReceived(
436 FrameHostMsg_DidStartProvisionalLoad(1, kRewrittenURL, 436 FrameHostMsg_DidStartProvisionalLoad(1, kRewrittenURL,
437 std::vector<GURL>(),
437 base::TimeTicks::Now())); 438 base::TimeTicks::Now()));
438 main_test_rfh()->SendNavigateWithParams(&params); 439 main_test_rfh()->SendNavigateWithParams(&params);
439 440
440 // This is the virtual URL. 441 // This is the virtual URL.
441 EXPECT_EQ(base::ASCIIToUTF16("view-source:chrome://blah"), 442 EXPECT_EQ(base::ASCIIToUTF16("view-source:chrome://blah"),
442 contents()->GetTitle()); 443 contents()->GetTitle());
443 444
444 // The actual URL navigated to. 445 // The actual URL navigated to.
445 EXPECT_EQ(kRewrittenURL, 446 EXPECT_EQ(kRewrittenURL,
446 contents()->GetController().GetLastCommittedEntry()->GetURL()); 447 contents()->GetController().GetLastCommittedEntry()->GetURL());
(...skipping 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after
3435 // An automatic navigation. 3436 // An automatic navigation.
3436 main_test_rfh()->SendNavigateWithModificationCallback( 3437 main_test_rfh()->SendNavigateWithModificationCallback(
3437 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); 3438 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture));
3438 3439
3439 EXPECT_EQ(1u, dialog_manager.reset_count()); 3440 EXPECT_EQ(1u, dialog_manager.reset_count());
3440 3441
3441 contents()->SetJavaScriptDialogManagerForTesting(nullptr); 3442 contents()->SetJavaScriptDialogManagerForTesting(nullptr);
3442 } 3443 }
3443 3444
3444 } // namespace content 3445 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698