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

Side by Side Diff: chrome/test/base/web_ui_browsertest.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 336 }
337 337
338 virtual void StartDataRequest( 338 virtual void StartDataRequest(
339 const std::string& path, 339 const std::string& path,
340 int render_process_id, 340 int render_process_id,
341 int render_view_id, 341 int render_view_id,
342 const content::URLDataSource::GotDataCallback& callback) OVERRIDE { 342 const content::URLDataSource::GotDataCallback& callback) OVERRIDE {
343 std::string dummy_html = "<html><body>Dummy</body></html>"; 343 std::string dummy_html = "<html><body>Dummy</body></html>";
344 scoped_refptr<base::RefCountedString> response = 344 scoped_refptr<base::RefCountedString> response =
345 base::RefCountedString::TakeString(&dummy_html); 345 base::RefCountedString::TakeString(&dummy_html);
346 callback.Run(response); 346 callback.Run(response.get());
347 } 347 }
348 348
349 virtual std::string GetMimeType(const std::string& path) const OVERRIDE { 349 virtual std::string GetMimeType(const std::string& path) const OVERRIDE {
350 return "text/html"; 350 return "text/html";
351 } 351 }
352 352
353 DISALLOW_COPY_AND_ASSIGN(MockWebUIDataSource); 353 DISALLOW_COPY_AND_ASSIGN(MockWebUIDataSource);
354 }; 354 };
355 355
356 // WebUIProvider to allow attaching the DataSource for the dummy URL when 356 // WebUIProvider to allow attaching the DataSource for the dummy URL when
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 // testDone directly and expect pass result. 772 // testDone directly and expect pass result.
773 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { 773 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) {
774 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); 774 ASSERT_TRUE(RunJavascriptAsyncTest("testDone"));
775 } 775 }
776 776
777 // Test that calling testDone during RunJavascriptTest still completes when 777 // Test that calling testDone during RunJavascriptTest still completes when
778 // waiting for async result. 778 // waiting for async result.
779 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { 779 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) {
780 ASSERT_TRUE(RunJavascriptTest("testDone")); 780 ASSERT_TRUE(RunJavascriptTest("testDone"));
781 } 781 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | chrome/test/chromedriver/chrome/devtools_http_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698