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

Side by Side Diff: chrome/renderer/extensions/extension_api_json_validity_unittest.cc

Issue 7541001: Move more files from chrome/test to chrome/test/base, part #3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/renderer/extensions/bindings_utils.h" 10 #include "chrome/renderer/extensions/bindings_utils.h"
11 #include "chrome/test/v8_unit_test.h" 11 #include "chrome/test/base/v8_unit_test.h"
12 #include "content/common/json_value_serializer.h" 12 #include "content/common/json_value_serializer.h"
13 #include "grit/common_resources.h" 13 #include "grit/common_resources.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace { 16 namespace {
17 17
18 // Given a ListValue* of dictionaries, find the first dictionary with 18 // Given a ListValue* of dictionaries, find the first dictionary with
19 // a property |property| whose string value is |expected_value|. The 19 // a property |property| whose string value is |expected_value|. The
20 // following conditions result in a return value of false, and an 20 // following conditions result in a return value of false, and an
21 // explanation in |out_error_message|: 21 // explanation in |out_error_message|:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 bindings_utils::GetStringResource(IDR_EXTENSION_API_JSON); 133 bindings_utils::GetStringResource(IDR_EXTENSION_API_JSON);
134 134
135 // Create a global variable holding the text of extension_api.json . 135 // Create a global variable holding the text of extension_api.json .
136 SetGlobalStringVar("ext_api_json_text", ext_api_string); 136 SetGlobalStringVar("ext_api_json_text", ext_api_string);
137 137
138 // Parse the text of extension_api.json . If there is a parse error, 138 // Parse the text of extension_api.json . If there is a parse error,
139 // an exception will be printed that includes a line number. 139 // an exception will be printed that includes a line number.
140 std::string test_js = "var extension_api = JSON.parse(ext_api_json_text);"; 140 std::string test_js = "var extension_api = JSON.parse(ext_api_json_text);";
141 ExecuteScriptInContext(test_js, "ParseExtensionApiJson"); 141 ExecuteScriptInContext(test_js, "ParseExtensionApiJson");
142 } 142 }
OLDNEW
« no previous file with comments | « chrome/common/net/gaia/google_service_auth_error_unittest.cc ('k') | chrome/renderer/extensions/json_schema_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698