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

Side by Side Diff: content/browser/devtools/protocol/devtools_protocol_browsertest.cc

Issue 1729373002: PlzNavigate: fix DevToolsProtocolTest.CrossSitePauseInBeforeUnload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed comments Created 4 years, 9 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 | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, NavigationPreservesMessages) { 337 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, NavigationPreservesMessages) {
338 ASSERT_TRUE(embedded_test_server()->Start()); 338 ASSERT_TRUE(embedded_test_server()->Start());
339 GURL test_url = embedded_test_server()->GetURL("/devtools/navigation.html"); 339 GURL test_url = embedded_test_server()->GetURL("/devtools/navigation.html");
340 NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 1); 340 NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 1);
341 Attach(); 341 Attach();
342 SendCommand("Page.enable", nullptr, false); 342 SendCommand("Page.enable", nullptr, false);
343 343
344 scoped_ptr<base::DictionaryValue> params(new base::DictionaryValue()); 344 scoped_ptr<base::DictionaryValue> params(new base::DictionaryValue());
345 test_url = GetTestUrl("devtools", "navigation.html"); 345 test_url = GetTestUrl("devtools", "navigation.html");
346 params->SetString("url", test_url.spec()); 346 params->SetString("url", test_url.spec());
347 TestNavigationObserver navigation_observer(shell()->web_contents());
347 SendCommand("Page.navigate", std::move(params), true); 348 SendCommand("Page.navigate", std::move(params), true);
349 navigation_observer.Wait();
348 350
349 bool enough_results = result_ids_.size() >= 2u; 351 bool enough_results = result_ids_.size() >= 2u;
350 EXPECT_TRUE(enough_results); 352 EXPECT_TRUE(enough_results);
351 if (enough_results) { 353 if (enough_results) {
352 EXPECT_EQ(1, result_ids_[0]); // Page.enable 354 EXPECT_EQ(1, result_ids_[0]); // Page.enable
353 EXPECT_EQ(2, result_ids_[1]); // Page.navigate 355 EXPECT_EQ(2, result_ids_[1]); // Page.navigate
354 } 356 }
355 357
356 enough_results = notifications_.size() >= 1u; 358 enough_results = notifications_.size() >= 1u;
357 EXPECT_TRUE(enough_results); 359 EXPECT_TRUE(enough_results);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 GURL("javascript:x=1"), 482 GURL("javascript:x=1"),
481 nullptr, 483 nullptr,
482 gfx::Size()); 484 gfx::Size());
483 WaitForLoadStop(window->web_contents()); 485 WaitForLoadStop(window->web_contents());
484 Attach(); 486 Attach();
485 SendCommand("Page.reload", nullptr, false); 487 SendCommand("Page.reload", nullptr, false);
486 // Should not crash at this point. 488 // Should not crash at this point.
487 } 489 }
488 490
489 } // namespace content 491 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/render_frame_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698