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

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

Issue 2140533003: DevTools: rename initialUrl to url in the Browser.createTarget protocol method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: headless test fixed Created 4 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
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 TestJavaScriptDialogManager dialog_manager; 580 TestJavaScriptDialogManager dialog_manager;
581 shell()->web_contents()->SetDelegate(&dialog_manager); 581 shell()->web_contents()->SetDelegate(&dialog_manager);
582 SendCommand("Page.enable", nullptr, true); 582 SendCommand("Page.enable", nullptr, true);
583 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue()); 583 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue());
584 params->SetString("expression", "alert('alert')"); 584 params->SetString("expression", "alert('alert')");
585 SendCommand("Runtime.evaluate", std::move(params), false); 585 SendCommand("Runtime.evaluate", std::move(params), false);
586 WaitForNotification("Page.javascriptDialogOpening"); 586 WaitForNotification("Page.javascriptDialogOpening");
587 dialog_manager.Handle(); 587 dialog_manager.Handle();
588 } 588 }
589 589
590 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, BrowserNewPage) { 590 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, BrowserCreateTarget) {
591 NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); 591 NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1);
592 Attach(); 592 Attach();
593 EXPECT_EQ(1u, shell()->windows().size()); 593 EXPECT_EQ(1u, shell()->windows().size());
594 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue()); 594 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue());
595 params->SetString("initialUrl", "about:blank"); 595 params->SetString("url", "about:blank");
596 SendCommand("Browser.newPage", std::move(params), true); 596 SendCommand("Browser.createTarget", std::move(params), true);
597 EXPECT_EQ(2u, shell()->windows().size()); 597 EXPECT_EQ(2u, shell()->windows().size());
598 } 598 }
599 599
600 } // namespace content 600 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/browser_handler.cc ('k') | headless/lib/headless_devtools_client_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698