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

Side by Side Diff: chrome/browser/ui/webui/web_ui_browsertest.cc

Issue 10686005: Add methods to add DataPack from open files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | chrome/test/base/chrome_test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/ui/webui/web_ui_browsertest.h" 5 #include "chrome/browser/ui/webui/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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 GURL(kDummyURL).host(), mock_provider_.Pointer()); 319 GURL(kDummyURL).host(), mock_provider_.Pointer());
320 320
321 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_)); 321 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_));
322 test_data_directory_ = test_data_directory_.Append(kWebUITestFolder); 322 test_data_directory_ = test_data_directory_.Append(kWebUITestFolder);
323 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, 323 ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA,
324 &gen_test_data_directory_)); 324 &gen_test_data_directory_));
325 325
326 // TODO(dtseng): should this be part of every BrowserTest or just WebUI test. 326 // TODO(dtseng): should this be part of every BrowserTest or just WebUI test.
327 FilePath resources_pack_path; 327 FilePath resources_pack_path;
328 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 328 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
329 ResourceBundle::GetSharedInstance().AddDataPack( 329 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
330 resources_pack_path, ui::SCALE_FACTOR_100P); 330 resources_pack_path, ui::SCALE_FACTOR_100P);
331 331
332 FilePath mockPath; 332 FilePath mockPath;
333 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &mockPath)); 333 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &mockPath));
334 mockPath = mockPath.AppendASCII("chrome"); 334 mockPath = mockPath.AppendASCII("chrome");
335 mockPath = mockPath.AppendASCII("third_party"); 335 mockPath = mockPath.AppendASCII("third_party");
336 mockPath = mockPath.AppendASCII("mock4js"); 336 mockPath = mockPath.AppendASCII("mock4js");
337 mockPath = mockPath.Append(kMockJS); 337 mockPath = mockPath.Append(kMockJS);
338 AddLibrary(mockPath); 338 AddLibrary(mockPath);
339 AddLibrary(FilePath(kWebUILibraryJS)); 339 AddLibrary(FilePath(kWebUILibraryJS));
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 // testDone directly and expect pass result. 698 // testDone directly and expect pass result.
699 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) { 699 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPassesAsync) {
700 ASSERT_TRUE(RunJavascriptAsyncTest("testDone")); 700 ASSERT_TRUE(RunJavascriptAsyncTest("testDone"));
701 } 701 }
702 702
703 // Test that calling testDone during RunJavascriptTest still completes when 703 // Test that calling testDone during RunJavascriptTest still completes when
704 // waiting for async result. 704 // waiting for async result.
705 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) { 705 IN_PROC_BROWSER_TEST_F(WebUIBrowserAsyncTest, TestTestDoneEarlyPasses) {
706 ASSERT_TRUE(RunJavascriptTest("testDone")); 706 ASSERT_TRUE(RunJavascriptTest("testDone"));
707 } 707 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | chrome/test/base/chrome_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698