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

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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 if (newtab_result) 635 if (newtab_result)
636 *newtab_result = newtab; 636 *newtab_result = newtab;
637 } 637 }
638 638
639 // Tests that an extension page can call window.open to an extension URL and 639 // Tests that an extension page can call window.open to an extension URL and
640 // the new window has extension privileges. 640 // the new window has extension privileges.
641 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenExtension) { 641 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenExtension) {
642 ASSERT_TRUE(LoadExtension( 642 ASSERT_TRUE(LoadExtension(
643 test_data_dir_.AppendASCII("uitest").AppendASCII("window_open"))); 643 test_data_dir_.AppendASCII("uitest").AppendASCII("window_open")));
644 644
645 TabContents* newtab; 645 TabContents* newtab = NULL; // clang, needs investigation
646 ASSERT_NO_FATAL_FAILURE(WindowOpenHelper( 646 ASSERT_NO_FATAL_FAILURE(WindowOpenHelper(
647 browser(), 647 browser(),
648 GURL(std::string("chrome-extension://") + last_loaded_extension_id_ + 648 GURL(std::string("chrome-extension://") + last_loaded_extension_id_ +
649 "/test.html"), 649 "/test.html"),
650 "newtab.html", &newtab)); 650 "newtab.html", &newtab));
651 651
652 bool result = false; 652 bool result = false;
653 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 653 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
654 newtab->render_view_host(), L"", L"testExtensionApi()", &result)); 654 newtab->render_view_host(), L"", L"testExtensionApi()", &result));
655 EXPECT_TRUE(result); 655 EXPECT_TRUE(result);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 L" window.chrome.app.isInstalled = false;" 854 L" window.chrome.app.isInstalled = false;"
855 L" return 'BAD: Should have thrown by now...';" 855 L" return 'BAD: Should have thrown by now...';"
856 L" } catch (e) {" 856 L" } catch (e) {"
857 L" return 'GOOD: Saw expected error.';" 857 L" return 'GOOD: Saw expected error.';"
858 L" }" 858 L" }"
859 L" }()" 859 L" }()"
860 L");", 860 L");",
861 &result)); 861 &result));
862 EXPECT_EQ("GOOD: Saw expected error.", result); 862 EXPECT_EQ("GOOD: Saw expected error.", result);
863 } 863 }
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