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

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

Issue 2263843002: DevTools: merge devtools target with devtools host, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: all done Created 4 years, 3 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 base::ListValue* target_infos; 705 base::ListValue* target_infos;
706 EXPECT_TRUE(result_->GetList("targetInfo", &target_infos)); 706 EXPECT_TRUE(result_->GetList("targetInfo", &target_infos));
707 EXPECT_EQ(1u, target_infos->GetSize()); 707 EXPECT_EQ(1u, target_infos->GetSize());
708 base::DictionaryValue* target_info; 708 base::DictionaryValue* target_info;
709 EXPECT_TRUE(target_infos->GetDictionary(0u, &target_info)); 709 EXPECT_TRUE(target_infos->GetDictionary(0u, &target_info));
710 std::string target_id, type, title, url; 710 std::string target_id, type, title, url;
711 EXPECT_TRUE(target_info->GetString("targetId", &target_id)); 711 EXPECT_TRUE(target_info->GetString("targetId", &target_id));
712 EXPECT_TRUE(target_info->GetString("type", &type)); 712 EXPECT_TRUE(target_info->GetString("type", &type));
713 EXPECT_TRUE(target_info->GetString("title", &title)); 713 EXPECT_TRUE(target_info->GetString("title", &title));
714 EXPECT_TRUE(target_info->GetString("url", &url)); 714 EXPECT_TRUE(target_info->GetString("url", &url));
715 EXPECT_EQ(type, "web_contents"); 715 EXPECT_EQ(type, "page");
716 EXPECT_EQ(title, "about:blank"); 716 EXPECT_EQ(title, "about:blank");
717 EXPECT_EQ(url, "about:blank"); 717 EXPECT_EQ(url, "about:blank");
718 } 718 }
719 719
720 namespace { 720 namespace {
721 class NavigationFinishedObserver : public content::WebContentsObserver { 721 class NavigationFinishedObserver : public content::WebContentsObserver {
722 public: 722 public:
723 explicit NavigationFinishedObserver(WebContents* web_contents) 723 explicit NavigationFinishedObserver(WebContents* web_contents)
724 : WebContentsObserver(web_contents), 724 : WebContentsObserver(web_contents),
725 num_finished_(0), 725 num_finished_(0),
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 params->SetString("policy", "advance"); 903 params->SetString("policy", "advance");
904 params->SetInteger("budget", 1000); 904 params->SetInteger("budget", 1000);
905 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true); 905 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true);
906 906
907 WaitForNotification("Emulation.virtualTimeBudgetExpired"); 907 WaitForNotification("Emulation.virtualTimeBudgetExpired");
908 908
909 EXPECT_THAT(console_messages_, ElementsAre("before", "done", "after")); 909 EXPECT_THAT(console_messages_, ElementsAre("before", "done", "after"));
910 } 910 }
911 911
912 } // namespace content 912 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698