OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/test/base/web_ui_browsertest.h" | 5 #include "chrome/test/base/web_ui_browsertest.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 330 |
331 private: | 331 private: |
332 virtual ~MockWebUIDataSource() {} | 332 virtual ~MockWebUIDataSource() {} |
333 | 333 |
334 virtual std::string GetSource() const OVERRIDE { | 334 virtual std::string GetSource() const OVERRIDE { |
335 return "dummyurl"; | 335 return "dummyurl"; |
336 } | 336 } |
337 | 337 |
338 virtual void StartDataRequest( | 338 virtual void StartDataRequest( |
339 const std::string& path, | 339 const std::string& path, |
340 bool is_incognito, | 340 int render_process_id, |
| 341 int render_view_id, |
341 const content::URLDataSource::GotDataCallback& callback) OVERRIDE { | 342 const content::URLDataSource::GotDataCallback& callback) OVERRIDE { |
342 std::string dummy_html = "<html><body>Dummy</body></html>"; | 343 std::string dummy_html = "<html><body>Dummy</body></html>"; |
343 scoped_refptr<base::RefCountedString> response = | 344 scoped_refptr<base::RefCountedString> response = |
344 base::RefCountedString::TakeString(&dummy_html); | 345 base::RefCountedString::TakeString(&dummy_html); |
345 callback.Run(response); | 346 callback.Run(response); |
346 } | 347 } |
347 | 348 |
348 virtual std::string GetMimeType(const std::string& path) const OVERRIDE { | 349 virtual std::string GetMimeType(const std::string& path) const OVERRIDE { |
349 return "text/html"; | 350 return "text/html"; |
350 } | 351 } |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 // testDone directly and expect pass result. | 772 // testDone directly and expect pass result. |
772 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { | 773 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { |
773 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); | 774 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); |
774 } | 775 } |
775 | 776 |
776 // Test that calling testDone during RunJavascriptTest still completes when | 777 // Test that calling testDone during RunJavascriptTest still completes when |
777 // waiting for async result. | 778 // waiting for async result. |
778 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { | 779 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { |
779 ASSERT_TRUE(RunJavascriptTest("testDone")); | 780 ASSERT_TRUE(RunJavascriptTest("testDone")); |
780 } | 781 } |
OLD | NEW |