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

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

Issue 2119063002: Add commands to manage tabs and contexts to Browser Domain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix name 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 TestJavaScriptDialogManager dialog_manager; 577 TestJavaScriptDialogManager dialog_manager;
578 shell()->web_contents()->SetDelegate(&dialog_manager); 578 shell()->web_contents()->SetDelegate(&dialog_manager);
579 SendCommand("Page.enable", nullptr, true); 579 SendCommand("Page.enable", nullptr, true);
580 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue()); 580 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue());
581 params->SetString("expression", "alert('alert')"); 581 params->SetString("expression", "alert('alert')");
582 SendCommand("Runtime.evaluate", std::move(params), false); 582 SendCommand("Runtime.evaluate", std::move(params), false);
583 WaitForNotification("Page.javascriptDialogOpening"); 583 WaitForNotification("Page.javascriptDialogOpening");
584 dialog_manager.Handle(); 584 dialog_manager.Handle();
585 } 585 }
586 586
587 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, BrowserNewPage) {
588 NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1);
589 Attach();
590 EXPECT_EQ(1u, shell()->windows().size());
591 std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue());
592 params->SetString("initialUrl", "about:blank");
593 SendCommand("Browser.newPage", std::move(params), true);
594 EXPECT_EQ(2u, shell()->windows().size());
595 }
596
587 } // namespace content 597 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698