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

Side by Side Diff: chrome/test/data/extensions/api_test/i18n/test.js

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | 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 // i18n api test 5 // i18n api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.I18N --lib=browser_tests 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.I18N --lib=browser_tests
7 7
8 var testCallback = chrome.test.testCallback; 8 var testCallback = chrome.test.testCallback;
9 var callbackPass = chrome.test.callbackPass; 9 var callbackPass = chrome.test.callbackPass;
10 10
11 chrome.test.getConfig(function(config) { 11 chrome.test.getConfig(function(config) {
12 12
13 var TEST_FILE_URL = "http://localhost:PORT/files/extensions/test_file.html" 13 var TEST_FILE_URL = "http://localhost:PORT/extensions/test_file.html"
14 .replace(/PORT/, config.testServer.port); 14 .replace(/PORT/, config.testServer.port);
15 15
16 chrome.test.runTests([ 16 chrome.test.runTests([
17 function getAcceptLanguages() { 17 function getAcceptLanguages() {
18 chrome.i18n.getAcceptLanguages(callbackPass(function(results) { 18 chrome.i18n.getAcceptLanguages(callbackPass(function(results) {
19 chrome.test.assertEq(results.length, 2); 19 chrome.test.assertEq(results.length, 2);
20 chrome.test.assertEq(results[0], "en-US"); 20 chrome.test.assertEq(results[0], "en-US");
21 chrome.test.assertEq(results[1], "en"); 21 chrome.test.assertEq(results[1], "en");
22 })); 22 }));
23 }, 23 },
(...skipping 26 matching lines...) Expand all
50 } 50 }
51 ); 51 );
52 chrome.test.log("Creating tab..."); 52 chrome.test.log("Creating tab...");
53 chrome.tabs.create({ 53 chrome.tabs.create({
54 url: TEST_FILE_URL 54 url: TEST_FILE_URL
55 }); 55 });
56 chrome.test.succeed(); 56 chrome.test.succeed();
57 } 57 }
58 ]); 58 ]);
59 }); 59 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698