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

Side by Side Diff: chrome/browser/extensions/api/runtime/runtime_apitest.cc

Issue 16470003: Add chrome.runtime.getPackageDirectoryEntry. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
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/extensions/api/runtime/runtime_api.h" 5 #include "chrome/browser/extensions/api/runtime/runtime_api.h"
6 #include "chrome/browser/extensions/extension_apitest.h" 6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_function_test_utils.h" 7 #include "chrome/browser/extensions/extension_function_test_utils.h"
8 #include "chrome/test/base/ui_test_utils.h" 8 #include "chrome/test/base/ui_test_utils.h"
9 9
10 // Tests the privileged components of chrome.runtime. 10 // Tests the privileged components of chrome.runtime.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 browser())); 42 browser()));
43 ASSERT_TRUE(result.get() != NULL); 43 ASSERT_TRUE(result.get() != NULL);
44 base::DictionaryValue* dict = 44 base::DictionaryValue* dict =
45 extension_function_test_utils::ToDictionary(result.get()); 45 extension_function_test_utils::ToDictionary(result.get());
46 ASSERT_TRUE(dict != NULL); 46 ASSERT_TRUE(dict != NULL);
47 EXPECT_TRUE(dict->HasKey("os")); 47 EXPECT_TRUE(dict->HasKey("os"));
48 EXPECT_TRUE(dict->HasKey("arch")); 48 EXPECT_TRUE(dict->HasKey("arch"));
49 EXPECT_TRUE(dict->HasKey("nacl_arch")); 49 EXPECT_TRUE(dict->HasKey("nacl_arch"));
50 } 50 }
51 51
52 // Tests chrome.runtime.getPackageDirectory with an app.
53 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
54 ChromeRuntimeGetPackageDirectoryEntryApp) {
55 ASSERT_TRUE(RunPlatformAppTest("runtime/get_package_directory/app"))
56 << message_;
57 }
58
59 // Tests chrome.runtime.getPackageDirectory with an extension.
60 IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
61 ChromeRuntimeGetPackageDirectoryEntryExtension) {
62 ASSERT_TRUE(RunExtensionTest("runtime/get_package_directory/extension"))
63 << message_;
64 }
65
52 } // namespace extensions 66 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/runtime/runtime_api.cc ('k') | chrome/browser/extensions/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698