Update from https://crrev.com/312398
Involves adding many //testing/test.gni imports, fixing one
SkSurface::NewRenderTarget invocation inside sky, and fixing up
base::Process usage in the shell.
Review URL: https://codereview.chromium.org/862133002
diff --git a/build/all.gyp b/build/all.gyp
index aa57010..b890f2c 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -29,8 +29,10 @@
'../third_party/libxml/libxml.gyp:*',
'../third_party/sqlite/sqlite.gyp:*',
'../third_party/zlib/zlib.gyp:*',
+ '../ui/accessibility/accessibility.gyp:*',
'../ui/base/ui_base.gyp:*',
'../ui/display/display.gyp:display_unittests',
+ '../ui/snapshot/snapshot.gyp:*',
'../url/url.gyp:*',
],
'conditions': [
@@ -49,17 +51,18 @@
# javascript-related targets cause v8 to be built.
'../mojo/mojo_base.gyp:mojo_common_lib',
'../mojo/mojo_base.gyp:mojo_common_unittests',
- '../mojo/mojo_edk.gyp:mojo_system_impl',
- '../mojo/mojo_edk_tests.gyp:mojo_public_bindings_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_environment_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_system_perftests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_system_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_public_utility_unittests',
- '../mojo/mojo_edk_tests.gyp:mojo_system_unittests',
- '../mojo/mojo_public.gyp:mojo_cpp_bindings',
- '../mojo/mojo_public.gyp:mojo_public_test_utils',
- '../mojo/mojo_public.gyp:mojo_system',
'../google_apis/google_apis.gyp:google_apis_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_bindings_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_environment_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_system_perftests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_system_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_public_utility_unittests',
+ '../third_party/mojo/mojo_edk_tests.gyp:mojo_system_unittests',
+ '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
+ '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
+ '../third_party/mojo/mojo_public.gyp:mojo_system',
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
'../ui/ios/ui_ios_tests.gyp:ui_ios_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
@@ -100,6 +103,7 @@
['OS!="ios" and OS!="android"', {
'dependencies': [
'../third_party/re2/re2.gyp:re2',
+ '../chrome/chrome.gyp:*',
'../chrome/tools/profile_reset/jtl_compiler.gyp:*',
'../cc/blink/cc_blink_tests.gyp:*',
'../cc/cc_tests.gyp:*',
@@ -144,21 +148,6 @@
'../v8/tools/gyp/v8.gyp:*',
'<(libjpeg_gyp_path):*',
],
- 'conditions': [
- ['use_athena==1' , {
- 'dependencies': [
- # Athena temporarily depends upon a subset of chrome. Since most
- # tests do not compile, we only include dependencies to tests we
- # want to build.
- '../chrome/chrome.gyp:chrome',
- '../chrome/chrome.gyp:browser_tests',
- ]
- }, {
- 'dependencies': [
- '../chrome/chrome.gyp:*',
- ],
- }],
- ],
}],
['use_openssl==0 and (OS=="mac" or OS=="ios" or OS=="win")', {
'dependencies': [
@@ -228,6 +217,17 @@
'../third_party/libevent/libevent.gyp:*',
],
}],
+ ['toolkit_views==1', {
+ 'dependencies': [
+ '../ui/views/controls/webview/webview.gyp:*',
+ '../ui/views/views.gyp:*',
+ ],
+ }],
+ ['use_aura==1', {
+ 'dependencies': [
+ '../ui/aura/aura.gyp:*',
+ ],
+ }],
['use_ash==1', {
'dependencies': [
'../ash/ash.gyp:*',
@@ -264,11 +264,6 @@
'../extensions/shell/app_shell.gyp:*',
],
}],
- ['chromeos==1', {
- 'dependencies': [
- '../athena/main/athena_main.gyp:*',
- ],
- }],
['envoy==1', {
'dependencies': [
'../envoy/envoy.gyp:*',
@@ -319,6 +314,9 @@
'../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:chromedriver_tests',
'../chrome/chrome.gyp:chromedriver_unittests',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_shell',
@@ -344,15 +342,6 @@
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
'../tools/telemetry/telemetry.gyp:*',
],
- 'conditions': [
- ['use_athena!=1', {
- 'dependencies' : [
- '../chrome/chrome.gyp:interactive_ui_tests',
- '../chrome/chrome.gyp:sync_integration_tests',
- '../chrome/chrome.gyp:unit_tests',
- ],
- }],
- ],
}],
['OS=="win"', {
'dependencies': [
@@ -437,6 +426,20 @@
'../printing/printing.gyp:printing_unittests',
],
}],
+ ['use_aura==1', {
+ 'dependencies': [
+ '../ui/app_list/app_list.gyp:app_list_unittests',
+ '../ui/aura/aura.gyp:aura_unittests',
+ '../ui/compositor/compositor.gyp:compositor_unittests',
+ '../ui/keyboard/keyboard.gyp:keyboard_unittests',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }],
+ ['use_aura==1 or toolkit_views==1', {
+ 'dependencies': [
+ '../ui/events/events.gyp:events_unittests',
+ ],
+ }],
['use_ash==1', {
'dependencies': [
'../ash/ash.gyp:ash_unittests',
@@ -1073,6 +1076,7 @@
'../ui/events/events.gyp:events_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/views.gyp:views_unittests',
'../url/url.gyp:url_unittests',
],
'conditions': [
@@ -1169,7 +1173,10 @@
'../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
'../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_heap_unittests',
'../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_platform_unittests',
+ '../ui/accessibility/accessibility.gyp:accessibility_unittests',
'../ui/app_list/app_list.gyp:app_list_unittests',
+ '../ui/aura/aura.gyp:aura_unittests',
+ '../ui/compositor/compositor.gyp:compositor_unittests',
'../ui/display/display.gyp:display_unittests',
'../ui/events/events.gyp:events_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
@@ -1216,6 +1223,7 @@
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/views.gyp:views_unittests',
'../url/url.gyp:url_unittests',
],
'conditions': [
@@ -1246,6 +1254,8 @@
'../cc/cc_tests.gyp:cc_unittests',
'../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:chrome',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:unit_tests',
'../components/components_tests.gyp:components_unittests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_unittests',
@@ -1255,7 +1265,9 @@
'../remoting/remoting.gyp:remoting_unittests',
'../skia/skia_tests.gyp:skia_unittests',
'../ui/app_list/app_list.gyp:*',
+ '../ui/aura/aura.gyp:*',
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/compositor/compositor.gyp:*',
'../ui/display/display.gyp:display_unittests',
'../ui/events/events.gyp:*',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
@@ -1263,15 +1275,13 @@
'../ui/message_center/message_center.gyp:*',
'../ui/snapshot/snapshot.gyp:snapshot_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
+ '../ui/views/views.gyp:views',
+ '../ui/views/views.gyp:views_unittests',
+ '../ui/wm/wm.gyp:*',
'blink_tests',
],
'conditions': [
- ['use_athena!=1', {
- 'dependencies': [
- '../chrome/chrome.gyp:interactive_ui_tests',
- '../chrome/chrome.gyp:unit_tests',
- ],
- }],
['OS=="win"', {
'dependencies': [
'../chrome/chrome.gyp:crash_service',
@@ -1299,11 +1309,16 @@
}],
['chromeos==1', {
'dependencies': [
- '../athena/main/athena_main.gyp:*',
'../chromeos/chromeos.gyp:chromeos_unittests',
'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_unittests',
],
}],
+ ['use_ozone==1', {
+ 'dependencies': [
+ '../ui/ozone/ozone.gyp:*',
+ '../ui/ozone/demo/ozone_demos.gyp:*',
+ ],
+ }],
],
},
], # targets
@@ -1331,19 +1346,13 @@
'dependencies': [
'../base/base.gyp:base_unittests_run',
'../chrome/chrome.gyp:browser_tests_run',
+ '../chrome/chrome.gyp:interactive_ui_tests_run',
+ '../chrome/chrome.gyp:sync_integration_tests_run',
+ '../chrome/chrome.gyp:unit_tests_run',
'../content/content_shell_and_tests.gyp:content_browsertests_run',
'../content/content_shell_and_tests.gyp:content_unittests_run',
'../net/net.gyp:net_unittests_run',
],
- 'conditions' : [
- ['use_athena!=1', {
- 'dependencies': [
- '../chrome/chrome.gyp:interactive_ui_tests_run',
- '../chrome/chrome.gyp:sync_integration_tests_run',
- '../chrome/chrome.gyp:unit_tests_run',
- ],
- }],
- ],
}, # target_name: chromium_swarm_tests
],
}],
@@ -1358,5 +1367,18 @@
}, # target_name: chromoting_swarm_tests
]
}],
+ ['OS=="mac" and toolkit_views==1', {
+ 'targets': [
+ {
+ 'target_name': 'macviews_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
+ '../ui/views/views.gyp:views',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }, # target_name: macviews_builder
+ ], # targets
+ }], # os=='mac' and toolkit_views==1
], # conditions
}
diff --git a/build/android/PRESUBMIT.py b/build/android/PRESUBMIT.py
index b3dfd72..ad09630 100644
--- a/build/android/PRESUBMIT.py
+++ b/build/android/PRESUBMIT.py
@@ -69,7 +69,8 @@
J('pylib', 'utils', 'md5sum_test.py'),
],
env=pylib_test_env))
- output.extend(_CheckDeletionsOnlyFiles(input_api, output_api))
+ # TODO(jbudorick): Reenable this check once upstreaming is finished.
+ # output.extend(_CheckDeletionsOnlyFiles(input_api, output_api))
return output
diff --git a/build/android/adb_kill_android_webview_shell b/build/android/adb_kill_android_webview_shell
new file mode 100755
index 0000000..5f287f0
--- /dev/null
+++ b/build/android/adb_kill_android_webview_shell
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Copyright 2015 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.
+#
+# Kill a running android webview shell.
+#
+# Assumes you have sourced the build/android/envsetup.sh script.
+
+SHELL_PID_LINES=$(adb shell ps | grep ' org.chromium.android_webview.shell')
+VAL=$(echo "$SHELL_PID_LINES" | wc -l)
+if [ $VAL -lt 1 ] ; then
+ echo "Not running android webview shell."
+else
+ SHELL_PID=$(echo $SHELL_PID_LINES | awk '{print $2}')
+ if [ "$SHELL_PID" != "" ] ; then
+ set -x
+ adb shell kill $SHELL_PID
+ set -
+ else
+ echo "Android webview shell does not appear to be running."
+ fi
+fi
diff --git a/build/android/findbugs_filter/findbugs_exclude.xml b/build/android/findbugs_filter/findbugs_exclude.xml
index 0fff636..fba286d 100644
--- a/build/android/findbugs_filter/findbugs_exclude.xml
+++ b/build/android/findbugs_filter/findbugs_exclude.xml
@@ -17,29 +17,8 @@
<Match>
<Class name="~org\.chromium\..*\.Manifest(\$\w+)?" />
</Match>
- <!-- Ignore bugs in NativeLibraries.java (the auto-generation confuses findbugs). -->
- <Match>
- <Class name="~org\.chromium\.base\..*\.NativeLibraries.*?" />
- </Match>
- <!--
- Ignore bugs in CleanupReferenceTest.java (redundant null check)
- TODO(joth): Group all GC related tests and filter them out, since the null
- check is necessary to make sure the nullification is flushed to memory.
- -->
- <Match>
- <Class name="~org\.chromium\.content\..*\.CleanupReferenceTest.*?" />
- </Match>
- <!-- Ignore errors in JavaBridge due to reflection. -->
- <Match>
- <Class name="~.*\.JavaBridge.*"/>
- <Bug code="UuF,UrF,UMAC" />
- </Match>
- <!-- "Struct" like classes expect to have unused public data members -->
- <Match>
- <Class name="~.*android_webview.*FileChooserParams"/>
- <Bug code="UrF" />
- </Match>
<!-- Ignore "reliance on default String encoding" warnings, as we're not multi-platform -->
+
<Bug pattern="DM_DEFAULT_ENCODING" />
<!-- Ignore bugs that are often false-positives in test code -->
<Match>
@@ -50,67 +29,14 @@
</Or>
</Match>
<!--
- Ignore calls to System.exit() following errors during loading the native library.
- There is no way to recover from such errors without restarting the application,
- so System.exit() is the best solution.
+ crbug.com/449101
+ Ignore findbugs plugin test cases.
-->
<Match>
- <Class name="~org\.chromium\.chrome\..*\.ChromiumSyncAdapter.*" />
- <Method name="run" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.ChromiumSyncAdapter" />
- <Method name="startBrowserProcessesSync" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.ChromeShellActivity" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.AccountsChangedReceiver.*" />
- <Method name="run" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.chrome\..*\.NotificationService" />
- <Method name="dispatchIntentOnUIThread" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="org.chromium.chrome.browser.preferences.Preferences" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.content\..*\.ChildProcessService.*" />
- <Method name="run" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\..*ContentBrowserTestsActivity" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\..*ContentShellActivity" />
- <Method name="onCreate" />
- <Bug code="Dm" />
- </Match>
- <Match>
- <Class name="~org\.chromium\.components\.gcm_driver\..*\.GCMDriver" />
- <Method name="launchNativeThen" />
- <Bug code="Dm" />
- </Match>
- <!--
- Ignore write to static field in GCMDriver, as it's the cleanest way to mark
- the singleton as null when the native counterpart is destroyed.
- -->
- <Match>
- <Class name="~org\.chromium\.components\.gcm_driver\..*\.GCMDriver" />
- <Method name="destroy" />
- <Bug code="ST" />
+ <Or>
+ <Class name="~org\.chromium\.tools\.findbugs\.plugin\.SimpleSynchronizedMethod" />
+ <Class name="~org\.chromium\.tools\.findbugs\.plugin\.SimpleSynchronizedStaticMethod" />
+ <Class name="~org\.chromium\.tools\.findbugs\.plugin\.SimpleSynchronizedThis" />
+ </Or>
</Match>
</FindBugsFilter>
diff --git a/build/android/findbugs_filter/findbugs_known_bugs.txt b/build/android/findbugs_filter/findbugs_known_bugs.txt
index 1a6bbdd..26c4b1c 100644
--- a/build/android/findbugs_filter/findbugs_known_bugs.txt
+++ b/build/android/findbugs_filter/findbugs_known_bugs.txt
@@ -1,33 +1,7 @@
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeArrayCoercionTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeArrayTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeBasicsTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeChildFrameTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeCoercionTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeFieldsTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeReturnValuesTest.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeTestBase.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At PerfTraceEvent.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At SimpleSynchronizedMethod.java
-M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At SimpleSynchronizedStaticMethod.java
-M C CST: Shouldn't use synchronized(this), please narrow down the synchronization scope. At SimpleSynchronizedThis.java
-M D DMI: Hard coded reference to an absolute pathname in org.chromium.android_webview.test.ArchiveTest.testAutoBadPath() At ArchiveTest.java
-M D DMI: Hard coded reference to an absolute pathname in org.chromium.android_webview.test.ArchiveTest.testExplicitBadPath() At ArchiveTest.java
-M D SF: Switch statement found in org.chromium.chrome.browser.ChromeBrowserProvider.insert(Uri, ContentValues) where one case falls through to the next case At ChromeBrowserProvider.java
-M M UG: org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.getBooleanValue() is unsynchronized, org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.setBooleanValue(boolean) is synchronized At JavaBridgeReturnValuesTest.java
-M M UG: org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.getStringValue() is unsynchronized, org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.setStringValue(String) is synchronized At JavaBridgeReturnValuesTest.java
-M V EI2: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.setFavicon(byte[]) may expose internal representation by storing an externally mutable object into ChromeBrowserProvider$BookmarkNode.mFavicon At ChromeBrowserProvider.java
-M V EI2: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.setThumbnail(byte[]) may expose internal representation by storing an externally mutable object into ChromeBrowserProvider$BookmarkNode.mThumbnail At ChromeBrowserProvider.java
-M V EI: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.favicon() may expose internal representation by returning ChromeBrowserProvider$BookmarkNode.mFavicon At ChromeBrowserProvider.java
-M V EI: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.thumbnail() may expose internal representation by returning ChromeBrowserProvider$BookmarkNode.mThumbnail At ChromeBrowserProvider.java
-M M LI: Incorrect lazy initialization of static field org.chromium.chrome.browser.sync.ProfileSyncService.sSyncSetupManager in org.chromium.chrome.browser.sync.ProfileSyncService.get(Context) At ProfileSyncService.java
-M V EI2: org.chromium.content_public.browser.LoadUrlParams.setPostData(byte[]) may expose internal representation by storing an externally mutable object into LoadUrlParams.mPostData At LoadUrlParams.java
-M V EI: org.chromium.content_public.browser.LoadUrlParams.getPostData() may expose internal representation by returning LoadUrlParams.mPostData At LoadUrlParams.java
-M V EI2: org.chromium.net.ChromiumUrlRequest.setUploadData(String, byte[]) may expose internal representation by storing an externally mutable object into ChromiumUrlRequest.mUploadData At ChromiumUrlRequest.java
+M M LI: Incorrect lazy initialization of static field org.chromium.chrome.browser.download.DownloadManagerService.sDownloadManagerService in org.chromium.chrome.browser.download.DownloadManagerService.getDownloadManagerService(Context) At DownloadManagerService.java
M D UrF: Unread public/protected field: org.chromium.chrome.browser.document.PendingDocumentData.extraHeaders At DocumentTabModelSelector.java
M D UrF: Unread public/protected field: org.chromium.chrome.browser.document.PendingDocumentData.postData At DocumentTabModelSelector.java
M D UrF: Unread public/protected field: org.chromium.chrome.browser.document.PendingDocumentData.referrer At DocumentTabModelSelector.java
M D UuF: Unused public or protected field: org.chromium.chrome.browser.document.PendingDocumentData.nativeWebContents In PendingDocumentData.java
M D UuF: Unused public or protected field: org.chromium.chrome.browser.document.PendingDocumentData.originalIntent In PendingDocumentData.java
M D UuF: Unused public or protected field: org.chromium.chrome.browser.document.PendingDocumentData.url In PendingDocumentData.java
-M V EI2: org.chromium.mojo.system.Core$WaitManyResult.setSignalStates(Core$HandleSignalsState[]) may expose internal representation by storing an externally mutable object into Core$WaitManyResult.mSignalStates At Core.java
-M V EI: org.chromium.mojo.system.Core$WaitManyResult.getSignalStates() may expose internal representation by returning Core$WaitManyResult.mSignalStates At Core.java
diff --git a/build/android/gyp/jinja_template.py b/build/android/gyp/jinja_template.py
index 8e579aa..3a93f74 100755
--- a/build/android/gyp/jinja_template.py
+++ b/build/android/gyp/jinja_template.py
@@ -6,6 +6,7 @@
"""Renders one or more template files using the Jinja template engine."""
+import codecs
import optparse
import os
import sys
@@ -18,13 +19,13 @@
def ProcessFile(input_filename, output_filename, variables):
- with open(input_filename, 'r') as input_file:
+ with codecs.open(input_filename, 'r', 'utf-8') as input_file:
input_ = input_file.read()
env = jinja2.Environment(undefined=jinja2.StrictUndefined)
template = env.from_string(input_)
template.filename = os.path.abspath(input_filename)
output = template.render(variables)
- with open(output_filename, 'w') as output_file:
+ with codecs.open(output_filename, 'w', 'utf-8') as output_file:
output_file.write(output)
diff --git a/build/android/gyp/write_ordered_libraries.py b/build/android/gyp/write_ordered_libraries.py
index b361bc3..49c933a 100755
--- a/build/android/gyp/write_ordered_libraries.py
+++ b/build/android/gyp/write_ordered_libraries.py
@@ -31,7 +31,7 @@
_library_dirs = None
_library_re = re.compile(
- '.*NEEDED.*Shared library: \[(?P<library_name>[\w/.]+)\]')
+ '.*NEEDED.*Shared library: \[(?P<library_name>.+)\]')
def SetReadelfPath(path):
diff --git a/build/android/pylib/gtest/filter/base_unittests_disabled b/build/android/pylib/gtest/filter/base_unittests_disabled
index a64dd57..bf2311d 100644
--- a/build/android/pylib/gtest/filter/base_unittests_disabled
+++ b/build/android/pylib/gtest/filter/base_unittests_disabled
@@ -20,6 +20,9 @@
ScopedJavaRefTest.RefCounts
# Death tests are not supported with apks.
*DeathTest*
+FileTest.MemoryCorruption
+MessagePumpLibeventTest.QuitOutsideOfRun
+ScopedFD.ScopedFDCrashesOnCloseFailure
# http://crbug.com/245043
StackContainer.BufferAlignment
diff --git a/build/android/pylib/gtest/filter/cc_unittests_disabled b/build/android/pylib/gtest/filter/cc_unittests_disabled
new file mode 100644
index 0000000..feab5ac
--- /dev/null
+++ b/build/android/pylib/gtest/filter/cc_unittests_disabled
@@ -0,0 +1,5 @@
+# Death tests are not supported with apks.
+BeginFrameObserverMixInTest.OnBeginFrameImplementation
+BeginFrameSourceMixInTest.ObserverManipulation
+BeginFrameSourceMultiplexerTest.SourcesManipulation
+BeginFrameSourceMultiplexerTest.MinimumIntervalNegativeFails
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 271f7d9..a87f81a 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -152,7 +152,7 @@
self._test_package = None
self._test_runner = None
self._test_support_apk = None
- self.__inititalizeApkAttributes(args, error_func)
+ self.__initializeApkAttributes(args, error_func)
self._data_deps = None
self._isolate_abs_path = None
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index 74898c2..ec0baee 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -321,6 +321,10 @@
'%s/%s' % (self.test_pkg.GetPackageName(), self.options.test_runner),
raw=True, extras=extras, timeout=timeout, retries=0)
+ def _GenerateTestResult(self, test, instr_statuses, start_ms, duration_ms):
+ return instrumentation_test_instance.GenerateTestResult(
+ test, instr_statuses, start_ms, duration_ms)
+
#override
def RunTest(self, test):
results = base_test_result.TestRunResults()
@@ -344,8 +348,7 @@
# Parse the test output
_, _, statuses = (
instrumentation_test_instance.ParseAmInstrumentRawOutput(raw_output))
- result = instrumentation_test_instance.GenerateTestResult(
- test, statuses, start_ms, duration_ms)
+ result = self._GenerateTestResult(test, statuses, start_ms, duration_ms)
if local_device_instrumentation_test_run.DidPackageCrashOnDevice(
self.test_pkg.GetPackageName(), self.device):
result.SetType(base_test_result.ResultType.CRASH)
diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py
index c6d29f4..53d6f17 100644
--- a/build/android/pylib/local/device/local_device_test_run.py
+++ b/build/android/pylib/local/device/local_device_test_run.py
@@ -58,7 +58,7 @@
all_fail_results[result.GetName()] = result
results_names = set(r.GetName() for r in results.GetAll())
- tests = [t for t in tests if t not in results_names]
+ tests = [t for t in tests if self._GetTestName(t) not in results_names]
tries += 1
all_unknown_test_names = set(tests)
@@ -85,6 +85,9 @@
def _CreateShards(self, tests):
raise NotImplementedError
+ def _GetTestName(self, test):
+ return test
+
def _GetTests(self):
raise NotImplementedError
diff --git a/build/android/pylib/remote/device/remote_device_environment.py b/build/android/pylib/remote/device/remote_device_environment.py
index 0e48ee6..3fdc716 100644
--- a/build/android/pylib/remote/device/remote_device_environment.py
+++ b/build/android/pylib/remote/device/remote_device_environment.py
@@ -17,6 +17,9 @@
class RemoteDeviceEnvironment(environment.Environment):
"""An environment for running on remote devices."""
+ _ENV_KEY = 'env'
+ _DEVICE_KEY = 'device'
+
def __init__(self, args, error_func):
"""Constructor.
@@ -102,6 +105,16 @@
"""Tears down the test run when used as a context manager."""
self.TearDown()
+ def DumpTo(self, persisted_data):
+ env_data = {
+ self._DEVICE_KEY: self._device,
+ }
+ persisted_data[self._ENV_KEY] = env_data
+
+ def LoadFrom(self, persisted_data):
+ env_data = persisted_data[self._ENV_KEY]
+ self._device = env_data[self._DEVICE_KEY]
+
def _GetAccessToken(self):
"""Generates access token for remote device service."""
logging.info('Generating remote service access token')
@@ -145,7 +158,7 @@
or device['available_devices_count']):
logging.info('Found device: %s %s',
device['name'], device['os_version'])
- return device['device_type_id']
+ return device
self._NoDeviceFound(device_list)
def _PrintAvailableDevices(self, device_list):
@@ -166,37 +179,42 @@
raise remote_device_helper.RemoteDeviceError('No device found.')
@property
- def device(self):
- return self._device
+ def collect(self):
+ return self._collect
@property
- def token(self):
- return self._access_token
+ def device_type_id(self):
+ return self._device['device_type_id']
+
+ @property
+ def only_output_failures(self):
+ # TODO(jbudorick): Remove this once b/18981674 is fixed.
+ return True
@property
def results_path(self):
return self._results_path
@property
+ def runner_package(self):
+ return self._runner_package
+
+ @property
def runner_type(self):
return self._runner_type
@property
- def runner_package(self):
- return self._runner_package
+ def timeouts(self):
+ return self._timeouts
+
+ @property
+ def token(self):
+ return self._access_token
@property
def trigger(self):
return self._trigger
@property
- def collect(self):
- return self._collect
-
- @property
def verbose_count(self):
return self._verbose_count
-
- @property
- def timeouts(self):
- return self._timeouts
diff --git a/build/android/pylib/remote/device/remote_device_gtest_run.py b/build/android/pylib/remote/device/remote_device_gtest_run.py
index 3a6c447..e5f6990 100644
--- a/build/android/pylib/remote/device/remote_device_gtest_run.py
+++ b/build/android/pylib/remote/device/remote_device_gtest_run.py
@@ -7,6 +7,7 @@
import logging
import os
import sys
+import tempfile
from pylib import constants
from pylib.base import base_test_result
@@ -15,6 +16,14 @@
from pylib.remote.device import remote_device_helper
+_EXTRA_COMMAND_LINE_FILE = (
+ 'org.chromium.native_test.ChromeNativeTestActivity.CommandLineFile')
+# TODO(jbudorick): Remove this extra when b/18981674 is fixed.
+_EXTRA_ONLY_OUTPUT_FAILURES = (
+ 'org.chromium.native_test.ChromeNativeTestInstrumentationTestRunner.'
+ 'OnlyOutputFailures')
+
+
class RemoteDeviceGtestRun(remote_device_test_run.RemoteDeviceTestRun):
"""Run gtests and uirobot tests on a remote device."""
@@ -43,8 +52,20 @@
dummy_app_path = os.path.join(
constants.GetOutDirectory(), 'apks', 'remote_device_dummy.apk')
- self._AmInstrumentTestSetup(dummy_app_path, self._test_instance.apk,
- runner_package)
+ with tempfile.NamedTemporaryFile(suffix='.flags.txt') as flag_file:
+ env_vars = {}
+ filter_string = self._test_instance._GenerateDisabledFilterString(None)
+ if filter_string:
+ flag_file.write('_ --gtest_filter=%s' % filter_string)
+ flag_file.flush()
+ env_vars[_EXTRA_COMMAND_LINE_FILE] = os.path.basename(flag_file.name)
+ self._test_instance._data_deps.append(
+ (os.path.abspath(flag_file.name), None))
+ if self._env.only_output_failures:
+ env_vars[_EXTRA_ONLY_OUTPUT_FAILURES] = None
+ self._AmInstrumentTestSetup(
+ dummy_app_path, self._test_instance.apk, runner_package,
+ environment_variables=env_vars)
_INSTRUMENTATION_STREAM_LEADER = 'INSTRUMENTATION_STATUS: stream='
@@ -62,6 +83,8 @@
if l.startswith(self._INSTRUMENTATION_STREAM_LEADER))
results_list = self._test_instance.ParseGTestOutput(output)
results.AddResults(results_list)
+ if self._env.only_output_failures:
+ logging.info('See logcat for more results information.')
if not self._results['results']['pass']:
results.AddResult(base_test_result.BaseTestResult(
'Remote Service detected error.',
diff --git a/build/android/pylib/remote/device/remote_device_test_run.py b/build/android/pylib/remote/device/remote_device_test_run.py
index cdc8777..86ee587 100644
--- a/build/android/pylib/remote/device/remote_device_test_run.py
+++ b/build/android/pylib/remote/device/remote_device_test_run.py
@@ -4,6 +4,7 @@
"""Run specific test on specific environment."""
+import json
import logging
import os
import sys
@@ -20,6 +21,9 @@
class RemoteDeviceTestRun(test_run.TestRun):
"""Run gtests and uirobot tests on a remote device."""
+ _TEST_RUN_KEY = 'test_run'
+ _TEST_RUN_ID_KEY = 'test_run_id'
+
WAIT_TIME = 5
COMPLETE = 'complete'
HEARTBEAT_INTERVAL = 300
@@ -40,29 +44,37 @@
self._test_run_id = ''
#override
+ def SetUp(self):
+ """Set up a test run."""
+ if self._env.trigger:
+ self._TriggerSetUp()
+ elif self._env.collect:
+ assert isinstance(self._env.trigger, basestring), (
+ 'File for storing test_run_id must be a string.')
+ with open(self._env.collect, 'r') as persisted_data_file:
+ persisted_data = json.loads(persisted_data_file.read())
+ self._env.LoadFrom(persisted_data)
+ self.LoadFrom(persisted_data)
+
+ def _TriggerSetUp(self):
+ """Set up the triggering of a test run."""
+ raise NotImplementedError
+
+ #override
def RunTests(self):
"""Run the test."""
if self._env.trigger:
with appurify_sanitized.SanitizeLogging(self._env.verbose_count,
logging.WARNING):
test_start_res = appurify_sanitized.api.tests_run(
- self._env.token, self._env.device, self._app_id, self._test_id)
+ self._env.token, self._env.device_type_id, self._app_id,
+ self._test_id)
remote_device_helper.TestHttpResponse(
test_start_res, 'Unable to run test.')
self._test_run_id = test_start_res.json()['response']['test_run_id']
logging.info('Test run id: %s' % self._test_run_id)
- if not self._env.collect:
- assert isinstance(self._env.trigger, basestring), (
- 'File for storing test_run_id must be a string.')
- with open(self._env.trigger, 'w') as test_run_id_file:
- test_run_id_file.write(self._test_run_id)
if self._env.collect:
- if not self._env.trigger:
- assert isinstance(self._env.trigger, basestring), (
- 'File for storing test_run_id must be a string.')
- with open(self._env.collect, 'r') as test_run_id_file:
- self._test_run_id = test_run_id_file.read().strip()
current_status = ''
timeout_counter = 0
heartbeat_counter = 0
@@ -91,8 +103,19 @@
#override
def TearDown(self):
"""Tear down the test run."""
- if (self._env.collect
- and self._GetTestStatus(self._test_run_id) != self.COMPLETE):
+ if self._env.collect:
+ self._CollectTearDown()
+ elif self._env.trigger:
+ assert isinstance(self._env.trigger, basestring), (
+ 'File for storing test_run_id must be a string.')
+ with open(self._env.trigger, 'w') as persisted_data_file:
+ persisted_data = {}
+ self.DumpTo(persisted_data)
+ self._env.DumpTo(persisted_data)
+ persisted_data_file.write(json.dumps(persisted_data))
+
+ def _CollectTearDown(self):
+ if self._GetTestStatus(self._test_run_id) != self.COMPLETE:
with appurify_sanitized.SanitizeLogging(self._env.verbose_count,
logging.WARNING):
test_abort_res = appurify_sanitized.api.tests_abort(
@@ -109,15 +132,15 @@
"""Tear down the test run when used as a context manager."""
self.TearDown()
- #override
- def SetUp(self):
- """Set up a test run."""
- if self._env.trigger:
- self._TriggerSetUp()
+ def DumpTo(self, persisted_data):
+ test_run_data = {
+ self._TEST_RUN_ID_KEY: self._test_run_id,
+ }
+ persisted_data[self._TEST_RUN_KEY] = test_run_data
- def _TriggerSetUp(self):
- """Set up the triggering of a test run."""
- raise NotImplementedError
+ def LoadFrom(self, persisted_data):
+ test_run_data = persisted_data[self._TEST_RUN_KEY]
+ self._test_run_id = test_run_data[self._TEST_RUN_ID_KEY]
def _ParseTestResults(self):
raise NotImplementedError
@@ -170,8 +193,12 @@
self._results = test_check_res.json()['response']
return self._results['status']
- def _AmInstrumentTestSetup(self, app_path, test_path, runner_package):
+ def _AmInstrumentTestSetup(self, app_path, test_path, runner_package,
+ environment_variables):
config = {'runner': runner_package}
+ if environment_variables:
+ config['environment_vars'] = ','.join(
+ '%s=%s' % (k, v) for k, v in environment_variables.iteritems())
self._app_id = self._UploadAppToDevice(app_path)
@@ -183,11 +210,12 @@
with zipfile.ZipFile(test_with_deps.name, 'w') as zip_file:
zip_file.write(test_path, host_test, zipfile.ZIP_DEFLATED)
for h, _ in data_deps:
- zip_utils.WriteToZipFile(zip_file, h, '.')
if os.path.isdir(h):
+ zip_utils.WriteToZipFile(zip_file, h, '.')
sdcard_files.extend(os.listdir(h))
else:
- sdcard_files.extend(h)
+ zip_utils.WriteToZipFile(zip_file, h, os.path.basename(h))
+ sdcard_files.append(os.path.basename(h))
config['sdcard_files'] = ','.join(sdcard_files)
config['host_test'] = host_test
self._test_id = self._UploadTestToDevice(
@@ -232,7 +260,13 @@
"""
logging.info('Generating config file for test.')
with tempfile.TemporaryFile() as config:
- config_data = ['[appurify]', '[%s]' % runner_type]
+ config_data = [
+ '[appurify]',
+ 'pcap=0',
+ 'profiler=0',
+ 'videocapture=0',
+ '[%s]' % runner_type
+ ]
config_data.extend('%s=%s' % (k, v) for k, v in body.iteritems())
config.write(''.join('%s\n' % l for l in config_data))
config.flush()
diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py
index 48059a3..02f5d6a 100644
--- a/build/android/pylib/uiautomator/test_runner.py
+++ b/build/android/pylib/uiautomator/test_runner.py
@@ -74,7 +74,8 @@
force_stop=True)
cmd = ['uiautomator', 'runtest',
self.test_pkg.UIAUTOMATOR_PATH + self.test_pkg.GetPackageName(),
- '-e', 'class', test]
+ '-e', 'class', test,
+ '-e', 'test_package', self._package]
return self.device.RunShellCommand(cmd, timeout=timeout, retries=0)
#override
diff --git a/build/android/pylib/utils/findbugs.py b/build/android/pylib/utils/findbugs.py
index d946f31..82408b0 100644
--- a/build/android/pylib/utils/findbugs.py
+++ b/build/android/pylib/utils/findbugs.py
@@ -32,8 +32,11 @@
def _DiffKnownWarnings(current_warnings_set, known_bugs_file):
- with open(known_bugs_file, 'r') as known_bugs:
- known_bugs_set = set(known_bugs.read().splitlines())
+ if os.path.exists(known_bugs_file):
+ with open(known_bugs_file, 'r') as known_bugs:
+ known_bugs_set = set(known_bugs.read().splitlines())
+ else:
+ known_bugs_set = set()
new_warnings = current_warnings_set - known_bugs_set
_PrintMessage(sorted(new_warnings), 'New', 'Please fix, or perhaps add to',
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 049b1ab..e92f851 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -123,39 +123,39 @@
group = parser.add_argument_group('Remote Device Options')
group.add_argument('--trigger', default='',
- help=('Only triggers the test if set. Stores test_run_id '
- 'in given file path. '))
+ help=('Only triggers the test if set. Stores test_run_id '
+ 'in given file path. '))
group.add_argument('--collect', default='',
- help=('Only collects the test results if set. '
- 'Gets test_run_id from given file path.'))
+ help=('Only collects the test results if set. '
+ 'Gets test_run_id from given file path.'))
group.add_argument('--remote-device', default='',
- help=('Device type to run test on.'))
+ help='Device type to run test on.')
group.add_argument('--remote-device-os', default='',
- help=('OS to have on the device.'))
+ help='OS to have on the device.')
group.add_argument('--results-path', default='',
- help=('File path to download results to.'))
+ help='File path to download results to.')
group.add_argument('--api-protocol',
- help=('HTTP protocol to use. (http or https)'))
- group.add_argument('--api-address', help=('Address to send HTTP requests.'))
- group.add_argument('--api-port', help=('Port to send HTTP requests to.'))
+ help='HTTP protocol to use. (http or https)')
+ group.add_argument('--api-address', help='Address to send HTTP requests.')
+ group.add_argument('--api-port', help='Port to send HTTP requests to.')
group.add_argument('--runner-type', default='',
- help=('Type of test to run as.'))
+ help='Type of test to run as.')
group.add_argument('--runner-package', default='',
- help=('Package name of test.'))
+ help='Package name of test.')
group.add_argument('--apk-under-test', default='apks/Chrome.apk',
- help=('APK to run tests on.'))
+ help='APK to run tests on.')
api_secret_group = group.add_mutually_exclusive_group()
api_secret_group.add_argument('--api-secret', default='',
- help=('API secret for remote devices.'))
+ help='API secret for remote devices.')
api_secret_group.add_argument('--api-secret-file', default='',
- help=('Path to file that contains API secret.'))
+ help='Path to file that contains API secret.')
api_key_group = group.add_mutually_exclusive_group()
api_key_group.add_argument('--api-key', default='',
- help=('API key for remote devices.'))
+ help='API key for remote devices.')
api_key_group.add_argument('--api-key-file', default='',
- help=('Path to file that contains API key.'))
+ help='Path to file that contains API key.')
def AddDeviceOptions(parser):
diff --git a/build/build_config.h b/build/build_config.h
index 57d41fb..b07660d 100644
--- a/build/build_config.h
+++ b/build/build_config.h
@@ -48,6 +48,7 @@
#endif
#elif defined(_WIN32)
#define OS_WIN 1
+#define TOOLKIT_VIEWS 1
#elif defined(__FreeBSD__)
#define OS_FREEBSD 1
#elif defined(__OpenBSD__)
diff --git a/build/common.gypi b/build/common.gypi
index 94d1877..119f5b4 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -190,6 +190,13 @@
'use_ash%': 0,
}],
+ # Set default value of toolkit_views based on OS.
+ ['OS=="win" or chromeos==1 or use_aura==1', {
+ 'toolkit_views%': 1,
+ }, {
+ 'toolkit_views%': 0,
+ }],
+
# Embedded builds use aura without ash or views.
['embedded==1', {
'use_aura%': 1,
@@ -424,11 +431,11 @@
# -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
# See http://clang.llvm.org/docs/UsersManual.html
'ubsan%': 0,
+ 'ubsan_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan/blacklist.txt',
# Enable building with UBsan's vptr (Clang's -fsanitize=vptr option).
# -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1
'ubsan_vptr%': 0,
- 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt',
# Use the dynamic libraries instrumented by one of the sanitizers
# instead of the standard system libraries.
@@ -982,9 +989,9 @@
'optimize_jni_generation%': 0,
}],
- # TODO(baixo): Enable v8_use_external_startup_data
+ # TODO(rmcilroy): Enable v8_use_external_startup_data on ChromeOS
# http://crbug.com/421063
- ['android_webview_build==0 and chromecast==0 and chromeos==0 and (OS=="android" or OS=="linux" or OS=="mac")', {
+ ['android_webview_build==0 and chromecast==0 and chromeos==0 and OS!="ios"', {
'v8_use_external_startup_data%': 1,
}, {
'v8_use_external_startup_data%': 0,
@@ -1123,8 +1130,8 @@
'tsan%': '<(tsan)',
'tsan_blacklist%': '<(tsan_blacklist)',
'ubsan%': '<(ubsan)',
+ 'ubsan_blacklist%': '<(ubsan_blacklist)',
'ubsan_vptr%': '<(ubsan_vptr)',
- 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)',
'use_instrumented_libraries%': '<(use_instrumented_libraries)',
'use_custom_libcxx%': '<(use_custom_libcxx)',
'use_system_libcxx%': '<(use_system_libcxx)',
@@ -1192,9 +1199,6 @@
'support_pre_M6_history_database%': '<(support_pre_M6_history_database)',
'v8_use_external_startup_data%': '<(v8_use_external_startup_data)',
- # Whether or not we are building the Athena shell.
- 'use_athena%': '0',
-
# Use system protobuf instead of bundled one.
'use_system_protobuf%': 0,
@@ -1449,6 +1453,10 @@
# Compile d8 for the host toolset.
'v8_toolset_for_d8': 'host',
+ # Enable the V8 heap verification code. The verification itself is enabled
+ # via a command line option.
+ 'v8_enable_verify_heap%': 1,
+
# Use brlapi from brltty for braille display support.
'use_brlapi%': 0,
@@ -1464,6 +1472,9 @@
# Set to 1 to compile with MSE support for MPEG2 TS
'enable_mpeg2ts_stream_parser%': 0,
+ # Support ChromeOS touchpad gestures with ozone.
+ 'use_evdev_gestures%': 0,
+
# Default ozone platform (if no --ozone-platform flag).
'ozone_platform%': "",
@@ -2126,7 +2137,7 @@
'conditions': [
# TODO(dcheng): https://crbug.com/417463 -- work to enable this flag
# on all platforms is currently underway.
- ['OS=="linux" and chromeos==0', {
+ ['(OS=="linux" and chromeos==0) or OS=="mac" or OS=="ios"', {
'clang_chrome_plugins_flags': [
'-Xclang',
'-plugin-arg-find-bad-constructs',
@@ -2341,11 +2352,6 @@
}, {
'use_seccomp_bpf%': 0,
}],
- # Set component build with LTO until all tests pass.
- # This also reduces link time.
- ['use_lto==1', {
- 'component%': "shared_library",
- }],
],
# older history files use fts2 instead of fts3
@@ -2579,9 +2585,15 @@
['component=="shared_library"', {
'defines': ['COMPONENT_BUILD'],
}],
+ ['toolkit_views==1', {
+ 'defines': ['TOOLKIT_VIEWS=1'],
+ }],
['ui_compositor_image_transport==1', {
'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
}],
+ ['use_aura==1', {
+ 'defines': ['USE_AURA=1'],
+ }],
['use_ash==1', {
'defines': ['USE_ASH=1'],
}],
@@ -3518,6 +3530,14 @@
],
},
}],
+ # TODO(thakis): Enable this everywhere. http://crbug.com/371125
+ ['(OS=="linux" or OS=="android") and asan==0 and msan==0 and tsan==0 and use_ozone!=1', {
+ 'target_defaults': {
+ 'ldflags': [
+ '-Wl,-z,defs',
+ ],
+ },
+ }],
['os_posix==1 and chromeos==0', {
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only
@@ -4193,8 +4213,7 @@
['_toolset=="target"', {
'cflags': [
'-fsanitize=undefined',
- # -fsanitize=vptr is incompatible with -fno-rtti.
- '-fno-sanitize=vptr',
+ '-fsanitize-blacklist=<(ubsan_blacklist)',
# Employ the experimental PBQP register allocator to avoid
# slow compilation on files with too many basic blocks.
# See http://crbug.com/426271.
@@ -4203,10 +4222,17 @@
# generated by PBQP regallocator. May increase compile time.
'-mllvm -pbqp-coalescing',
],
+ 'cflags_cc!': [
+ '-fno-rtti',
+ ],
+ 'cflags!': [
+ '-fno-rtti',
+ ],
'ldflags': [
'-fsanitize=undefined',
- # -fsanitize=vptr is incompatible with -fno-rtti.
- '-fno-sanitize=vptr',
+ ],
+ 'defines': [
+ 'UNDEFINED_SANITIZER',
],
}],
],
@@ -4216,7 +4242,7 @@
['_toolset=="target"', {
'cflags': [
'-fsanitize=vptr',
- '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
+ '-fsanitize-blacklist=<(ubsan_blacklist)',
],
'cflags_cc!': [
'-fno-rtti',
@@ -5522,13 +5548,13 @@
# invoked via /fallback. This is critical for using macros
# like ASAN_UNPOISON_MEMORY_REGION in files where we fall
# back.
- '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer',
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/include_sanitizer',
],
},
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
# TODO(hans): If make_clang_dir is absolute, this breaks.
- '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows',
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/lib/windows',
],
},
'target_conditions': [
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 0080085..c57ba3f 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -78,10 +78,31 @@
# TODO(brettw) should probably be "=1".
defines += [ "USE_UDEV" ]
}
+ if (toolkit_views) {
+ defines += [ "TOOLKIT_VIEWS=1" ]
+ }
if (ui_compositor_image_transport) {
# TODO(brettw) should probably be "=1".
defines += [ "UI_COMPOSITOR_IMAGE_TRANSPORT" ]
}
+ if (use_ash) {
+ defines += [ "USE_ASH=1" ]
+ }
+ if (use_aura) {
+ defines += [ "USE_AURA=1" ]
+ }
+ if (use_pango) {
+ defines += [ "USE_PANGO=1" ]
+ }
+ if (use_cairo) {
+ defines += [ "USE_CAIRO=1" ]
+ }
+ if (use_clipboard_aurax11) {
+ defines += [ "USE_CLIPBOARD_AURAX11=1" ]
+ }
+ if (use_default_render_theme) {
+ defines += [ "USE_DEFAULT_RENDER_THEME=1" ]
+ }
if (use_glib) {
defines += [ "USE_GLIB=1" ]
}
@@ -96,6 +117,9 @@
# to rename this but we're hoping to transition away from NSS.
defines += [ "USE_NSS=1" ]
}
+ if (use_ozone) {
+ defines += [ "USE_OZONE=1" ]
+ }
if (use_x11) {
defines += [ "USE_X11=1" ]
}
@@ -172,9 +196,6 @@
if (enable_one_click_signin) {
defines += [ "ENABLE_ONE_CLICK_SIGNIN" ]
}
- if (use_athena) {
- defines += [ "USE_ATHENA=1" ]
- }
if (enable_hidpi) {
defines += [ "ENABLE_HIDPI=1" ]
}
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index e9e7006..099db51 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -717,202 +717,3 @@
}
}
}
-
-# ==============================================================================
-# TEST SETUP
-# ==============================================================================
-
-# Define a test as an executable (or shared_library on Android) with the
-# "testonly" flag set.
-template("test") {
- if (is_android) {
- shared_library(target_name) {
- # Configs will always be defined since we set_defaults for a component
- # above. We want to use those rather than whatever came with the nested
- # shared/static library inside the component.
- configs = [] # Prevent list overwriting warning.
- configs = invoker.configs
-
- # See above call.
- set_sources_assignment_filter([])
-
- testonly = true
-
- if (defined(invoker.all_dependent_configs)) {
- all_dependent_configs = invoker.all_dependent_configs
- }
- if (defined(invoker.allow_circular_includes_from)) {
- allow_circular_includes_from = invoker.allow_circular_includes_from
- }
- if (defined(invoker.cflags)) {
- cflags = invoker.cflags
- }
- if (defined(invoker.cflags_c)) {
- cflags_c = invoker.cflags_c
- }
- if (defined(invoker.cflags_cc)) {
- cflags_cc = invoker.cflags_cc
- }
- if (defined(invoker.cflags_objc)) {
- cflags_objc = invoker.cflags_objc
- }
- if (defined(invoker.cflags_objcc)) {
- cflags_objcc = invoker.cflags_objcc
- }
- if (defined(invoker.check_includes)) {
- check_includes = invoker.check_includes
- }
- if (defined(invoker.data)) {
- data = invoker.data
- }
- if (defined(invoker.data_deps)) {
- data_deps = invoker.data_deps
- }
- if (defined(invoker.datadeps)) {
- datadeps = invoker.datadeps
- }
- if (defined(invoker.defines)) {
- defines = invoker.defines
- }
- if (defined(invoker.deps)) {
- deps = invoker.deps
- }
- if (defined(invoker.direct_dependent_configs)) {
- direct_dependent_configs = invoker.direct_dependent_configs
- }
- if (defined(invoker.forward_dependent_configs_from)) {
- forward_dependent_configs_from = invoker.forward_dependent_configs_from
- }
- if (defined(invoker.include_dirs)) {
- include_dirs = invoker.include_dirs
- }
- if (defined(invoker.ldflags)) {
- ldflags = invoker.ldflags
- }
- if (defined(invoker.lib_dirs)) {
- lib_dirs = invoker.lib_dirs
- }
- if (defined(invoker.libs)) {
- libs = invoker.libs
- }
- if (defined(invoker.output_extension)) {
- output_extension = invoker.output_extension
- }
- if (defined(invoker.output_name)) {
- output_name = invoker.output_name
- }
- if (defined(invoker.public)) {
- public = invoker.public
- }
- if (defined(invoker.public_configs)) {
- public_configs = invoker.public_configs
- }
- if (defined(invoker.public_deps)) {
- public_deps = invoker.public_deps
- }
- if (defined(invoker.sources)) {
- sources = invoker.sources
- }
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
- }
- } else {
- executable(target_name) {
- # See above.
- configs = [] # Prevent list overwriting warning.
- configs = invoker.configs
-
- # See above call.
- set_sources_assignment_filter([])
-
- testonly = true
-
- if (defined(invoker.all_dependent_configs)) {
- all_dependent_configs = invoker.all_dependent_configs
- }
- if (defined(invoker.allow_circular_includes_from)) {
- allow_circular_includes_from = invoker.allow_circular_includes_from
- }
- if (defined(invoker.cflags)) {
- cflags = invoker.cflags
- }
- if (defined(invoker.cflags_c)) {
- cflags_c = invoker.cflags_c
- }
- if (defined(invoker.cflags_cc)) {
- cflags_cc = invoker.cflags_cc
- }
- if (defined(invoker.cflags_objc)) {
- cflags_objc = invoker.cflags_objc
- }
- if (defined(invoker.cflags_objcc)) {
- cflags_objcc = invoker.cflags_objcc
- }
- if (defined(invoker.check_includes)) {
- check_includes = invoker.check_includes
- }
- if (defined(invoker.data)) {
- data = invoker.data
- }
- if (defined(invoker.data_deps)) {
- data_deps = invoker.data_deps
- }
- if (defined(invoker.datadeps)) {
- datadeps = invoker.datadeps
- }
- if (defined(invoker.defines)) {
- defines = invoker.defines
- }
-
- # All shared libraries must have the sanitizer deps to properly link in
- # asan mode (this target will be empty in other cases).
- if (defined(invoker.deps)) {
- deps = invoker.deps + [ "//build/config/sanitizers:deps" ]
- } else {
- deps = [
- "//build/config/sanitizers:deps",
- ]
- }
- if (defined(invoker.direct_dependent_configs)) {
- direct_dependent_configs = invoker.direct_dependent_configs
- }
- if (defined(invoker.forward_dependent_configs_from)) {
- forward_dependent_configs_from = invoker.forward_dependent_configs_from
- }
- if (defined(invoker.include_dirs)) {
- include_dirs = invoker.include_dirs
- }
- if (defined(invoker.ldflags)) {
- ldflags = invoker.ldflags
- }
- if (defined(invoker.lib_dirs)) {
- lib_dirs = invoker.lib_dirs
- }
- if (defined(invoker.libs)) {
- libs = invoker.libs
- }
- if (defined(invoker.output_extension)) {
- output_extension = invoker.output_extension
- }
- if (defined(invoker.output_name)) {
- output_name = invoker.output_name
- }
- if (defined(invoker.public)) {
- public = invoker.public
- }
- if (defined(invoker.public_configs)) {
- public_configs = invoker.public_configs
- }
- if (defined(invoker.public_deps)) {
- public_deps = invoker.public_deps
- }
- if (defined(invoker.sources)) {
- sources = invoker.sources
- }
- if (defined(invoker.visibility)) {
- visibility = invoker.visibility
- }
- }
- }
-}
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 3772769..4778705 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -15,6 +15,7 @@
rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir)
template("android_lint") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -62,6 +63,7 @@
}
template("dex") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -113,6 +115,7 @@
# Creates a zip archive of the inputs.
# If base_dir is provided, the archive paths will be relative to it.
template("zip") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -155,6 +158,7 @@
# See build/android/gyp/write_build_config.py and
# build/android/gyp/util/build_utils.py:ExpandFileArgs
template("write_build_config") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -288,6 +292,7 @@
}
template("process_java_prebuilt") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -375,6 +380,7 @@
# Packages resources, assets, dex, and native libraries into an apk. Signs and
# zipaligns the apk.
template("create_apk") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -554,6 +560,7 @@
}
template("java_prebuilt_impl") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -633,6 +640,7 @@
# jar_path: Use this to explicitly set the output jar path. Defaults to
# "${target_gen_dir}/${target_name}.jar.
template("compile_java") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -733,6 +741,7 @@
}
template("java_library_impl") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -916,6 +925,7 @@
# Runs process_resources.py
template("process_resources") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1006,6 +1016,7 @@
}
template("copy_ex") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1053,6 +1064,7 @@
# Produces a single .dex.jar out of a set of Java dependencies.
template("deps_dex") {
+ set_sources_assignment_filter([])
build_config = "$target_gen_dir/${target_name}.build_config"
write_build_config("${target_name}__build_config") {
type = "deps_dex"
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index b33cd88..07431d7 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -30,6 +30,7 @@
# jni_package = "foo"
# }
template("generate_jni") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -128,6 +129,7 @@
# jni_package = "foo"
# }
template("generate_jar_jni") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -237,6 +239,7 @@
# include_path = "android/java/templates"
# }
template("java_cpp_template") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -333,6 +336,7 @@
# ]
# }
template("java_cpp_enum") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -392,6 +396,7 @@
# output = "$target_gen_dir/AndroidManifest.xml"
# }
template("jinja_template") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -448,6 +453,7 @@
# variables = ["color=red"]
# }
template("jinja_template_resources") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -530,6 +536,7 @@
# custom_package = "org.chromium.foo"
# }
template("android_resources") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -600,6 +607,7 @@
# grd_file = "foo_strings.grd"
# }
template("java_strings_grd") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -666,6 +674,7 @@
# ]
# }
template("java_strings_grd_prebuilt") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -725,6 +734,8 @@
# main_class = "org.chromium.foo.FooMain"
# }
template("java_binary") {
+ set_sources_assignment_filter([])
+
# TODO(cjhopman): This should not act like a java_library for dependents (i.e.
# dependents shouldn't get the jar in their classpath, etc.).
java_library_impl(target_name) {
@@ -810,6 +821,7 @@
# ]
# }
template("java_library") {
+ set_sources_assignment_filter([])
java_library_impl(target_name) {
if (defined(invoker.DEPRECATED_java_in_dir)) {
DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir
@@ -876,6 +888,7 @@
# ]
# }
template("java_prebuilt") {
+ set_sources_assignment_filter([])
java_prebuilt_impl(target_name) {
jar_path = invoker.jar_path
if (defined(invoker.testonly)) {
@@ -942,6 +955,7 @@
# ]
# }
template("android_library") {
+ set_sources_assignment_filter([])
assert(!defined(invoker.jar_path),
"android_library does not support a custom jar path")
java_library_impl(target_name) {
@@ -1008,6 +1022,7 @@
# will be packaged into the resulting .dex.jar file.
# dex_path: location at which the output file will be put
template("android_standalone_library") {
+ set_sources_assignment_filter([])
deps_dex(target_name) {
deps = invoker.deps
dex_path = invoker.dex_path
@@ -1037,6 +1052,7 @@
# ]
# }
template("android_java_prebuilt") {
+ set_sources_assignment_filter([])
java_prebuilt_impl(target_name) {
jar_path = invoker.jar_path
supports_android = true
@@ -1105,6 +1121,7 @@
# ]
# }
template("android_apk") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1437,6 +1454,7 @@
# unittests_dep = ":foo_unittests"
# }
template("unittest_apk") {
+ set_sources_assignment_filter([])
testonly = true
assert(defined(invoker.unittests_dep), "Need unittests_dep for $target_name")
@@ -1508,6 +1526,7 @@
# ]
# }
template("android_aidl") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1583,6 +1602,7 @@
# binary = "$root_build_dir/exe.stripped/foo"
# }
template("create_native_executable_dist") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
@@ -1663,6 +1683,7 @@
# sources = [ "$proto_path/foo.proto" ]
# }
template("proto_java_library") {
+ set_sources_assignment_filter([])
_protoc_dep = "//third_party/android_protobuf:android_protoc($host_toolchain)"
_protoc_out_dir = get_label_info(_protoc_dep, "root_out_dir")
_protoc_bin = "$_protoc_out_dir/android_protoc"
@@ -1705,6 +1726,7 @@
# TODO(GYP): implement this.
template("uiautomator_test") {
+ set_sources_assignment_filter([])
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index c61964f..b5c4a90 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -301,6 +301,7 @@
"-Wl,-z,noexecstack",
"-Wl,-z,now",
"-Wl,-z,relro",
+ "-Wl,-z,defs",
]
}
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 2b9962f..0453c84 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -52,6 +52,10 @@
]
}
+pkg_config("pangocairo") {
+ packages = [ "pangocairo" ]
+}
+
pkg_config("pangoft2") {
packages = [ "pangoft2" ]
}
@@ -62,6 +66,16 @@
packages = [ "dbus-1" ]
}
+if (use_evdev_gestures) {
+ pkg_config("libevdev-cros") {
+ packages = [ "libevdev-cros" ]
+ }
+
+ pkg_config("libgestures") {
+ packages = [ "libgestures" ]
+ }
+}
+
config("x11") {
libs = [
"X11",
diff --git a/build/config/ui.gni b/build/config/ui.gni
index 8c8834c..46154a3 100644
--- a/build/config/ui.gni
+++ b/build/config/ui.gni
@@ -11,19 +11,52 @@
#
# See also build/config/features.gni
+declare_args() {
+ # Indicates if Ash is enabled. Ash is the Aura Shell which provides a
+ # desktop-like environment for Aura. Requires use_aura = true
+ use_ash = is_win || is_linux
+
+ # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
+ # that does not require X11.
+ use_ozone = false
+
+ # Support ChromeOS touchpad gestures with ozone.
+ use_evdev_gestures = false
+
+ # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
+ # of a replacement for GDI or GTK.
+ use_aura = is_win || is_linux
+
+ # True means the UI is built using the "views" framework.
+ toolkit_views = is_win || is_chromeos || use_aura
+
+ # Whether we should use glib, a low level C utility library.
+ use_glib = is_linux && !use_ozone
+}
+
# Additional dependent variables -----------------------------------------------
#
# These variables depend on other variables and can't be set externally.
+if (is_linux && use_glib) {
+ use_cairo = true
+ use_pango = true
+} else {
+ use_cairo = false
+ use_pango = false
+}
+
# Use GPU accelerated cross process image transport by default on linux builds
# with the Aura window manager.
-ui_compositor_image_transport = is_linux
+ui_compositor_image_transport = use_aura && is_linux
+
+use_default_render_theme = use_aura || is_linux
# Indicates if the UI toolkit depends on X11.
-use_x11 = is_linux
+use_x11 = is_linux && !use_ozone
-use_glib = is_linux
+use_ozone_evdev = use_ozone
-use_athena = false
+use_clipboard_aurax11 = is_linux && use_aura && use_x11
enable_hidpi = is_mac || is_chromeos || is_win
diff --git a/build/filename_rules.gypi b/build/filename_rules.gypi
index 6062601..1bef75f 100644
--- a/build/filename_rules.gypi
+++ b/build/filename_rules.gypi
@@ -71,6 +71,9 @@
['exclude', '(^|/)x/'],
],
}],
+ ['<(toolkit_views)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_views(_browsertest|_unittest)?\\.(h|cc)$'] ]
+ }],
['<(use_aura)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)aura/'],
@@ -93,5 +96,23 @@
['<(use_ash)==0 or OS!="win" or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_ashwin\\.(h|cc)$'] ]
}],
+ ['<(use_ozone)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_ozone(_browsertest|_unittest)?\\.(h|cc)$'],
+ ['exclude', '(^|/)ozone/'],
+ ]
+ }],
+ ['<(use_ozone_evdev)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_evdev(_browsertest|_unittest)?\\.(h|cc)$'],
+ ['exclude', '(^|/)evdev/'],
+ ]
+ }],
+ ['<(ozone_platform_dri)==0 or >(nacl_untrusted_build)==1', {
+ 'sources/': [ ['exclude', '_dri(_browsertest|_unittest)?\\.(h|cc)$'],
+ ['exclude', '(^|/)dri/'],
+ ]
+ }],
+ ['<(use_pango)==0', {
+ 'sources/': [ ['exclude', '(^|_)pango(_util|_browsertest|_unittest)?\\.(h|cc)$'], ],
+ }],
]
}
diff --git a/build/get_landmines.py b/build/get_landmines.py
index eb59367..ac3d7d6 100755
--- a/build/get_landmines.py
+++ b/build/get_landmines.py
@@ -28,8 +28,7 @@
builder() == 'ninja'):
print 'Need to clobber winja goma due to backend cwd cache fix.'
if platform() == 'android':
- print 'Clobber: To delete newly generated mojo class files.'
- print 'Clobber to ensure that recipe tests do not break (issue 680923002).'
+ print 'Clobber: to handle new way of suppressing findbugs failures.'
if platform() == 'win' and builder() == 'ninja':
print 'Compile on cc_unittests fails due to symbols removed in r185063.'
if platform() == 'linux' and builder() == 'ninja':
@@ -54,13 +53,11 @@
if (platform() != 'ios'):
print 'Clobber to get rid of obselete test plugin after r248358'
print 'Clobber to rebuild GN files for V8'
+ print 'Clobber to get rid of stale generated mojom.h files'
print 'Need to clobber everything due to build_nexe change in nacl r13424'
print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...'
print 'blink_resources.grd changed: crbug.com/400860'
print 'ninja dependency cycle: crbug.com/408192'
- if platform() == 'android':
- print 'Delete stale generated .java files yet again. crbug.com/349592'
- print 'Clobber to delete incompatible object binary format with NDK r10c'
print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).'
print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).'
print 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)'
diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh
index b61b033..4233c7f 100755
--- a/build/install-build-deps-android.sh
+++ b/build/install-build-deps-android.sh
@@ -12,6 +12,14 @@
# a license agreement, so upon installation it will prompt the user. To get
# past the curses-based dialog press TAB <ret> TAB <ret> to agree.
+args="$@"
+if test "$1" = "--skip-sdk-packages"; then
+ skip_inst_sdk_packages=1
+ args="${@:2}"
+else
+ skip_inst_sdk_packages=0
+fi
+
if ! uname -m | egrep -q "i686|x86_64"; then
echo "Only x86 architectures are currently supported" >&2
exit
@@ -19,7 +27,7 @@
# Install first the default Linux build deps.
"$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \
- --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "$@"
+ --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}"
lsb_release=$(lsb_release --codename --short)
@@ -84,16 +92,21 @@
fi
fi
-# Get the SDK extras packages to install from the DEPS file 'sdkextras' hook.
-packages="$(python -c 'execfile("./get_sdk_extras_packages.py")')"
-for package in "${packages}"; do
- package_num=$(../third_party/android_tools/sdk/tools/android list sdk | \
- grep -i "$package," | \
- awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}')
- if [[ -n ${package_num} ]]; then
- ../third_party/android_tools/sdk/tools/android update sdk --no-ui --filter \
- ${package_num}
- fi
-done
+if test "$skip_inst_sdk_packages" != 1; then
+ echo 'checking for sdk packages install'
+ # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook.
+ packages="$(python -c 'execfile("./get_sdk_extras_packages.py")')"
+ # Use absolute path to call 'android' so script can be run from any directory.
+ cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+ for package in "${packages}"; do
+ pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \
+ grep -i "$package," | \
+ awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}')
+ if [[ -n ${pkg_id} ]]; then
+ ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \
+ --filter ${pkg_id}
+ fi
+ done
+fi
echo "install-build-deps-android.sh complete."
diff --git a/build/isolate.gypi b/build/isolate.gypi
index e11fc39..e6d2f98 100644
--- a/build/isolate.gypi
+++ b/build/isolate.gypi
@@ -90,6 +90,7 @@
'--config-variable', 'libpeer_target_type=<(libpeer_target_type)',
'--config-variable', 'use_openssl=<(use_openssl)',
'--config-variable', 'target_arch=<(target_arch)',
+ '--config-variable', 'use_ozone=<(use_ozone)',
'--config-variable', 'disable_nacl=<(disable_nacl)',
],
'conditions': [
diff --git a/build/linux/system.gyp b/build/linux/system.gyp
index f1b0616..9079011 100644
--- a/build/linux/system.gyp
+++ b/build/linux/system.gyp
@@ -427,6 +427,44 @@
},
], # targets
}],
+ ['use_evdev_gestures==1', {
+ 'targets': [
+ {
+ 'target_name': 'libevdev-cros',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libevdev-cros)'
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libevdev-cros)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'libgestures',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libgestures)'
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libgestures)',
+ ],
+ },
+ },
+ ],
+ }],
['use_xkbcommon==1', {
'targets': [
{
@@ -1068,6 +1106,46 @@
],
},
{
+ 'target_name': 'pangocairo',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['use_pango==1 and use_cairo==1', {
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags pangocairo pangoft2)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
+ ],
+ },
+ }],
+ ],
+ }],
+ ],
+ },
+ {
'target_name': 'ssl',
'type': 'none',
'conditions': [
diff --git a/build/secondary/third_party/cacheinvalidation/BUILD.gn b/build/secondary/third_party/cacheinvalidation/BUILD.gn
index 53d8472..088f89a 100644
--- a/build/secondary/third_party/cacheinvalidation/BUILD.gn
+++ b/build/secondary/third_party/cacheinvalidation/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//testing/test.gni")
+
config("cacheinvalidation_config") {
include_dirs = [
"overrides",
diff --git a/build/secondary/third_party/leveldatabase/BUILD.gn b/build/secondary/third_party/leveldatabase/BUILD.gn
index 1ee030f..19eef15 100644
--- a/build/secondary/third_party/leveldatabase/BUILD.gn
+++ b/build/secondary/third_party/leveldatabase/BUILD.gn
@@ -4,6 +4,9 @@
# Snappy is a compression library we use.
# TODO(brettw) It's not clear why this needs to be parameterized.
+
+import("//testing/test.gni")
+
use_snappy = true
defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ]
diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni
index d876f2b..7a1cc26 100644
--- a/build/secondary/tools/grit/grit_rule.gni
+++ b/build/secondary/tools/grit/grit_rule.gni
@@ -118,6 +118,27 @@
]
}
+if (toolkit_views) {
+ grit_defines += [
+ "-D",
+ "toolkit_views",
+ ]
+}
+
+if (use_aura) {
+ grit_defines += [
+ "-D",
+ "use_aura",
+ ]
+}
+
+if (use_ash) {
+ grit_defines += [
+ "-D",
+ "use_ash",
+ ]
+}
+
if (use_nss_certs) {
grit_defines += [
"-D",
@@ -125,6 +146,13 @@
]
}
+if (use_ozone) {
+ grit_defines += [
+ "-D",
+ "use_ozone",
+ ]
+}
+
if (enable_image_loader_extension) {
grit_defines += [
"-D",