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

Unified Diff: chrome/browser/extensions/shared_module_apitest.cc

Issue 13971005: Basic multi-module support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add browser test Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/shared_module_apitest.cc
diff --git a/chrome/browser/extensions/shared_module_apitest.cc b/chrome/browser/extensions/shared_module_apitest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a31892db8d53a80f212edd8df4b7a7921b27b53e
--- /dev/null
+++ b/chrome/browser/extensions/shared_module_apitest.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_apitest.h"
+
+using extensions::Extension;
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SharedModule) {
+ // import_pass depends on this shared module.
+ // NB: We use LoadExtension instead of InstallExtension here so the public-key
+ // in 'shared' is used to generate the extension ID so it can be imported
+ // correctly. We use InstallExtension otherwise so the loads happen through
+ // the CRX installer which validates imports.
+ ASSERT_TRUE(LoadExtension(
+ test_data_dir_.AppendASCII("shared_module").AppendASCII("shared")));
+
+ ResultCatcher catcher;
+ EXPECT_TRUE(InstallExtension(
+ test_data_dir_.AppendASCII("shared_module").AppendASCII("import_pass"),
+ 1));
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
asargent_no_longer_on_chrome 2013/04/27 00:13:50 I think you might be able to slightly simplify thi
elijahtaylor1 2013/04/27 00:26:10 Good call, Done
+
+ EXPECT_FALSE(InstallExtension(
+ test_data_dir_.AppendASCII("shared_module")
+ .AppendASCII("import_wrong_version"), 0));
+ EXPECT_FALSE(InstallExtension(
+ test_data_dir_.AppendASCII("shared_module")
+ .AppendASCII("import_non_existent"), 0));
+}
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/renderer_host/chrome_render_view_host_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698