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

Side by Side Diff: chrome/browser/extensions/extension_browsertests_misc.cc

Issue 6368094: -Wuninitialized fixes Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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_util.h" 5 #include "base/file_util.h"
6 #include "base/ref_counted.h" 6 #include "base/ref_counted.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/browser_list.h" 8 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/extensions/autoupdate_interceptor.h" 9 #include "chrome/browser/extensions/autoupdate_interceptor.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 if (newtab_result) 701 if (newtab_result)
702 *newtab_result = newtab; 702 *newtab_result = newtab;
703 } 703 }
704 704
705 // Tests that an extension page can call window.open to an extension URL and 705 // Tests that an extension page can call window.open to an extension URL and
706 // the new window has extension privileges. 706 // the new window has extension privileges.
707 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenExtension) { 707 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenExtension) {
708 ASSERT_TRUE(LoadExtension( 708 ASSERT_TRUE(LoadExtension(
709 test_data_dir_.AppendASCII("uitest").AppendASCII("window_open"))); 709 test_data_dir_.AppendASCII("uitest").AppendASCII("window_open")));
710 710
711 TabContents* newtab; 711 TabContents* newtab = NULL; // clang, needs investigation
712 ASSERT_NO_FATAL_FAILURE(WindowOpenHelper( 712 ASSERT_NO_FATAL_FAILURE(WindowOpenHelper(
713 browser(), 713 browser(),
714 GURL(std::string("chrome-extension://") + last_loaded_extension_id_ + 714 GURL(std::string("chrome-extension://") + last_loaded_extension_id_ +
715 "/test.html"), 715 "/test.html"),
716 "newtab.html", &newtab)); 716 "newtab.html", &newtab));
717 717
718 bool result = false; 718 bool result = false;
719 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 719 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
720 newtab->render_view_host(), L"", L"testExtensionApi()", &result)); 720 newtab->render_view_host(), L"", L"testExtensionApi()", &result));
721 EXPECT_TRUE(result); 721 EXPECT_TRUE(result);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 L" window.chrome.app.isInstalled = false;" 920 L" window.chrome.app.isInstalled = false;"
921 L" return 'BAD: Should have thrown by now...';" 921 L" return 'BAD: Should have thrown by now...';"
922 L" } catch (e) {" 922 L" } catch (e) {"
923 L" return 'GOOD: Saw expected error.';" 923 L" return 'GOOD: Saw expected error.';"
924 L" }" 924 L" }"
925 L" }()" 925 L" }()"
926 L");", 926 L");",
927 &result)); 927 &result));
928 EXPECT_EQ("GOOD: Saw expected error.", result); 928 EXPECT_EQ("GOOD: Saw expected error.", result);
929 } 929 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/browser_options_handler.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698