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

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: for landing 3 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 base::ListValue* target_infos; 712 base::ListValue* target_infos;
713 EXPECT_TRUE(result_->GetList("targetInfo", &target_infos)); 713 EXPECT_TRUE(result_->GetList("targetInfo", &target_infos));
714 EXPECT_EQ(1u, target_infos->GetSize()); 714 EXPECT_EQ(1u, target_infos->GetSize());
715 base::DictionaryValue* target_info; 715 base::DictionaryValue* target_info;
716 EXPECT_TRUE(target_infos->GetDictionary(0u, &target_info)); 716 EXPECT_TRUE(target_infos->GetDictionary(0u, &target_info));
717 std::string target_id, type, title, url; 717 std::string target_id, type, title, url;
718 EXPECT_TRUE(target_info->GetString("targetId", &target_id)); 718 EXPECT_TRUE(target_info->GetString("targetId", &target_id));
719 EXPECT_TRUE(target_info->GetString("type", &type)); 719 EXPECT_TRUE(target_info->GetString("type", &type));
720 EXPECT_TRUE(target_info->GetString("title", &title)); 720 EXPECT_TRUE(target_info->GetString("title", &title));
721 EXPECT_TRUE(target_info->GetString("url", &url)); 721 EXPECT_TRUE(target_info->GetString("url", &url));
722 EXPECT_EQ(type, "web_contents"); 722 EXPECT_EQ(type, "page");
723 EXPECT_EQ(title, "about:blank"); 723 EXPECT_EQ(title, "about:blank");
724 EXPECT_EQ(url, "about:blank"); 724 EXPECT_EQ(url, "about:blank");
725 } 725 }
726 726
727 namespace { 727 namespace {
728 class NavigationFinishedObserver : public content::WebContentsObserver { 728 class NavigationFinishedObserver : public content::WebContentsObserver {
729 public: 729 public:
730 explicit NavigationFinishedObserver(WebContents* web_contents) 730 explicit NavigationFinishedObserver(WebContents* web_contents)
731 : WebContentsObserver(web_contents), 731 : WebContentsObserver(web_contents),
732 num_finished_(0), 732 num_finished_(0),
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 params->SetString("policy", "advance"); 931 params->SetString("policy", "advance");
932 params->SetInteger("budget", 1000); 932 params->SetInteger("budget", 1000);
933 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true); 933 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true);
934 934
935 WaitForNotification("Emulation.virtualTimeBudgetExpired"); 935 WaitForNotification("Emulation.virtualTimeBudgetExpired");
936 936
937 EXPECT_THAT(console_messages_, ElementsAre("before", "done", "after")); 937 EXPECT_THAT(console_messages_, ElementsAre("before", "done", "after"));
938 } 938 }
939 939
940 } // namespace content 940 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/browser_handler.cc ('k') | content/browser/devtools/protocol/service_worker_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698