OLD | NEW |
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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 int entry_id = cont.GetPendingEntry()->GetUniqueID(); | 426 int entry_id = cont.GetPendingEntry()->GetUniqueID(); |
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(¶ms, entry_id, true, kRewrittenURL, | 432 InitNavigateParams(¶ms, 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(FrameHostMsg_DidStartProvisionalLoad( | 435 main_test_rfh()->OnMessageReceived( |
436 1, kRewrittenURL, base::TimeTicks::Now(), NavigationGestureAuto)); | 436 FrameHostMsg_DidStartProvisionalLoad(1, kRewrittenURL, |
| 437 base::TimeTicks::Now())); |
437 main_test_rfh()->SendNavigateWithParams(¶ms); | 438 main_test_rfh()->SendNavigateWithParams(¶ms); |
438 | 439 |
439 // This is the virtual URL. | 440 // This is the virtual URL. |
440 EXPECT_EQ(base::ASCIIToUTF16("view-source:chrome://blah"), | 441 EXPECT_EQ(base::ASCIIToUTF16("view-source:chrome://blah"), |
441 contents()->GetTitle()); | 442 contents()->GetTitle()); |
442 | 443 |
443 // The actual URL navigated to. | 444 // The actual URL navigated to. |
444 EXPECT_EQ(kRewrittenURL, | 445 EXPECT_EQ(kRewrittenURL, |
445 contents()->GetController().GetLastCommittedEntry()->GetURL()); | 446 contents()->GetController().GetLastCommittedEntry()->GetURL()); |
446 } | 447 } |
(...skipping 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3414 // An automatic navigation. | 3415 // An automatic navigation. |
3415 main_test_rfh()->SendNavigateWithModificationCallback( | 3416 main_test_rfh()->SendNavigateWithModificationCallback( |
3416 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); | 3417 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); |
3417 | 3418 |
3418 EXPECT_EQ(1u, dialog_manager.reset_count()); | 3419 EXPECT_EQ(1u, dialog_manager.reset_count()); |
3419 | 3420 |
3420 contents()->SetJavaScriptDialogManagerForTesting(nullptr); | 3421 contents()->SetJavaScriptDialogManagerForTesting(nullptr); |
3421 } | 3422 } |
3422 | 3423 |
3423 } // namespace content | 3424 } // namespace content |
OLD | NEW |