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

Unified Diff: chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui_browsertest.cc

Issue 2349623003: Add a Browser Task Scheduler Chrome Internals Page (Closed)
Patch Set: Remvoe allowexternalscript 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui_browsertest.cc b/chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..84f8b5bda2dce39d50aaa950d10aa77344caa61e
--- /dev/null
+++ b/chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui_browsertest.cc
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/macros.h"
+#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/common/url_constants.h"
+#include "chrome/test/base/ui_test_utils.h"
+#include "chrome/test/base/web_ui_browser_test.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/url_constants.h"
+#include "ui/base/window_open_disposition.h"
+
+class TaskSchedulerInternalsWebUIBrowserTest : public WebUIBrowserTest {
+ public:
+ TaskSchedulerInternalsWebUIBrowserTest() = default;
+ ~TaskSchedulerInternalsWebUIBrowserTest() override = default;
+
+ void SetUpOnMainThread() override {
+ WebUIBrowserTest::SetUpOnMainThread();
+ std::string url_string(content::kChromeUIScheme);
+ url_string += "://";
+ url_string += chrome::kChromeUITaskSchedulerInternalsHost;
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(),
+ GURL(url_string),
+ WindowOpenDisposition::CURRENT_TAB,
+ ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TaskSchedulerInternalsWebUIBrowserTest);
+};
+
+// Test that navigation to the internals page works.
+IN_PROC_BROWSER_TEST_F(TaskSchedulerInternalsWebUIBrowserTest, Navigate) {
+ EXPECT_EQ(base::ASCIIToUTF16("Task Scheduler Internals"),
+ browser()->tab_strip_model()->GetActiveWebContents()->GetTitle());
+}
« no previous file with comments | « chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui.cc ('k') | chrome/chrome_paks.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698