%endif
Name: crosswalk
-Version: 7.36.153.0
+Version: 8.36.155.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
License: (BSD-3-Clause and LGPL-2.1+)
-MAJOR=7
+MAJOR=8
MINOR=36
-BUILD=153
+BUILD=155
PATCH=0
# The purpose of this function is to do the same as android_gyp(), but calling
# gyp_xwalk instead.
xwalk_android_gyp() {
+ echo "Deprecated: Please use xwalk/gyp_xwalk instead. xwalk_android_gyp \
+is going away."
+ echo "Notice: Add '-DOS=android' explicity to generate android building \
+environment."
"${SCRIPT_DIR}/../../../xwalk/gyp_xwalk" --check "$@"
}
%endif
Name: crosswalk
-Version: 7.36.153.0
+Version: 8.36.155.0
Release: 0
Summary: Crosswalk is an app runtime based on Chromium
License: (BSD-3-Clause and LGPL-2.1+)
#include "xwalk/runtime/browser/xwalk_runner_tizen.h"
+#include "content/public/browser/browser_thread.h"
+#include "crypto/nss_util.h"
#include "xwalk/runtime/browser/sysapps_component.h"
#include "xwalk/runtime/browser/xwalk_component.h"
#include "xwalk/runtime/common/xwalk_runtime_features.h"
void XWalkRunnerTizen::PreMainMessageLoopRun() {
XWalkRunner::PreMainMessageLoopRun();
+
+ // NSSInitSingleton is a costly operation (up to 100ms on VTC-1010),
+ // resulting in postponing the parsing and composition steps of the render
+ // process at cold start. Therefore, move the initialization logic here.
+ if (XWalkRunner::is_running_as_service()) {
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&crypto::EnsureNSSInit));
+ }
}
std::string XWalkRunnerTizen::GetLocale() const {
--- /dev/null
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2014 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.xwalk.core.xwview.test;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.chromium.base.test.util.Feature;
+
+import org.xwalk.core.XWalkNavigationItem;
+
+/**
+ * Test suite for GetItemAt().
+ */
+public class GetItemAtTest extends XWalkViewTestBase {
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ setXWalkClient(new XWalkViewTestBase.TestXWalkClient());
+ }
+
+ @SmallTest
+ @Feature({"GetItemAt"})
+ public void testGetItemAt() throws Throwable {
+ final String url1 = "about:blank";
+ final String url2 = "file:///android_asset/www/index.html";
+ final String title ="Crosswalk Sample Application";
+ assertTrue(getItemAtOnUiThread(-1) == null);
+ assertTrue(getItemAtOnUiThread(java.lang.Integer.MAX_VALUE) == null);
+ assertTrue(getItemAtOnUiThread(java.lang.Integer.MIN_VALUE) == null);
+ loadUrlSync(url1);
+ loadUrlSync(url2);
+ assertTrue(getItemAtOnUiThread(historySizeOnUiThread()) == null);
+ XWalkNavigationItem navigationItem1 = getItemAtOnUiThread(0);
+ assertEquals(url1, navigationItem1.getUrl());
+ XWalkNavigationItem navigationItem2 = getItemAtOnUiThread(1);
+ assertEquals(url2, navigationItem2.getUrl());
+ assertEquals(title, navigationItem2.getTitle());
+ }
+}
--- /dev/null
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2014 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.xwalk.core.xwview.test;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.chromium.base.test.util.Feature;
+
+import org.xwalk.core.XWalkNavigationItem;
+
+/**
+ * Test suite for HasItemAt().
+ */
+public class HasItemAtTest extends XWalkViewTestBase {
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ setXWalkClient(new XWalkViewTestBase.TestXWalkClient());
+ }
+
+ @SmallTest
+ @Feature({"HasItemAt"})
+ public void testHasItemAt() throws Throwable {
+ final String url1 = "about:blank";
+ final String url2 = "file:///android_asset/www/index.html";
+ assertFalse(hasItemAtOnUiThread(-1));
+ assertFalse(hasItemAtOnUiThread(java.lang.Integer.MAX_VALUE));
+ assertFalse(hasItemAtOnUiThread(java.lang.Integer.MIN_VALUE));
+ assertFalse(hasItemAtOnUiThread(0));
+ loadUrlSync(url1);
+ assertTrue(hasItemAtOnUiThread(0));
+ assertFalse(hasItemAtOnUiThread(1));
+ loadUrlSync(url2);
+ assertTrue(hasItemAtOnUiThread(1));
+ }
+}
--- /dev/null
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2014 Intel Corporation. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.xwalk.core.xwview.test;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.chromium.base.test.util.Feature;
+
+import org.xwalk.core.XWalkNavigationItem;
+
+/**
+ * Test suite for HistorySize().
+ */
+public class HistorySizeTest extends XWalkViewTestBase {
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ setXWalkClient(new XWalkViewTestBase.TestXWalkClient());
+ }
+
+ @SmallTest
+ @Feature({"HistorySize"})
+ public void testHistorySize() throws Throwable {
+ final String url1 = "about:blank";
+ final String url2 = "file:///android_asset/www/index.html";
+ assertEquals(0, historySizeOnUiThread());
+ loadUrlSync(url1);
+ assertEquals(1, historySizeOnUiThread());
+ loadUrlSync(url2);
+ assertEquals(2, historySizeOnUiThread());
+ goBackSync();
+ assertEquals(2, historySizeOnUiThread());
+ }
+}
});
}
+ protected int historySizeOnUiThread() throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<Integer>() {
+ @Override
+ public Integer call() {
+ return mXWalkView.getNavigationHistory().size();
+ }
+ });
+ }
+
+ protected boolean hasItemAtOnUiThread(final int index) throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<Boolean>() {
+ @Override
+ public Boolean call() {
+ return mXWalkView.getNavigationHistory().hasItemAt(index);
+ }
+ });
+ }
+
+ protected XWalkNavigationItem getItemAtOnUiThread(final int index) throws Throwable {
+ return runTestOnUiThreadAndGetResult(new Callable<XWalkNavigationItem>() {
+ @Override
+ public XWalkNavigationItem call() {
+ return mXWalkView.getNavigationHistory().getItemAt(index);
+ }
+ });
+ }
+
protected XWalkNavigationItem getCurrentItemOnUiThread() throws Throwable {
return runTestOnUiThreadAndGetResult(new Callable<XWalkNavigationItem>() {
@Override
gclient_utils.CheckCallAndFilterAndHeader(gclient_cmd,
always=self._options.verbose, cwd=self._root_dir)
- def RemoveOldSCMCheckouts(self):
- gclient_entries = os.path.join(self._root_dir, '.gclient_entries')
- if not os.path.isfile(gclient_entries):
- # This is the first time gclient sync is being called (ie. this is a new
- # checkout), so skip this step since `gclient recurse' requires
- # .gclient_entries to be present, even if it does not use it.
- return
-
- cmd = ('gclient', 'recurse', '--no-progress', '-j1',
- '--gclientfile=%s' % os.path.basename(self._new_gclient_file),
- os.path.join(self._tools_dir, 'scm-remove-wrong-checkout.py'))
-
- def _FilterSkippedDependencyMessage(line):
- if line.startswith('Skipped omitted dependency'):
- return
- print line
- gclient_utils.CheckCallAndFilterAndHeader(cmd,
- always=self._options.verbose, print_stdout=False,
- cwd=self._root_dir, filter_fn=_FilterSkippedDependencyMessage)
-
def main():
option_parser = optparse.OptionParser()
return 1
deps_fetcher = DepsFetcher(options)
- deps_fetcher.RemoveOldSCMCheckouts()
deps_fetcher.DoGclientSyncForChromium()
return 0
+++ /dev/null
-#!/usr/bin/env python
-
-# Copyright (c) 2014 Intel Corporation. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This is a helper script supposed to be invoked via `gclient recurse'.
-
-Its purpose is to remove directories pointed to by gclient entries that are
-expected to be git checkouts but are SVN checkouts instead (and vice-versa).
-
-It is useful when we migrate certain Crosswalk dependencies from standard SVN
-checkouts from Chromium to git ones hosted elsewhere and do not want to
-require everyone to manually remove their old checkouts first.
-"""
-
-import os
-import shutil
-import sys
-
-
-def main():
- try:
- repo_name = os.environ['GCLIENT_DEP_PATH']
- scm_name = os.environ['GCLIENT_SCM']
- except KeyError, key:
- print '%s is not part of the environment.' % key
- print 'Make sure this command is being run by gclient recurse.'
- return 1
-
- repo_abspath = os.getcwd()
- git_dir = os.path.join(repo_abspath, '.git')
- svn_dir = os.path.join(repo_abspath, '.svn')
- needs_clobber = False
-
- if scm_name == 'git' and os.path.isdir(svn_dir):
- print 'Old SVN checkout detected in %s. Removing directory.' % repo_name
- needs_clobber = True
- elif scm_name == 'svn' and os.path.isdir(git_dir):
- print 'Old git checkout detected in %s. Removing directory.' % repo_name
- needs_clobber = True
-
- if needs_clobber:
- shutil.rmtree(repo_abspath)
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())