0
Commit Graph

26 Commits

Author SHA1 Message Date
Ayu Ishii
108baf74da WebSQL: Limit WebSQL tests to Android only
This change limits WebSQL tests to Android only.
This is in preparation of the following CL that
limits WebSQL service creation to Android only since
WebSQL is only currently usable from Android WebView.
Removal from WebView is tracked in crbug.com/333756088.

Bug: 40910849
Change-Id: I1403f5bbdd46b311d4be7df47a2fcc0b92f0e941
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5397801
Reviewed-by: Joshua Hood <jdh@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291497}
2024-04-23 20:14:53 +00:00
Ayu Ishii
ae095d0d76 WebSQL: enable WebSQL in browsertests
WebSQL API is to be removed in M119 and will only be accessible
via flag. This change updates tests to enable WebSQL API
while the feature is accessible via flag.

Disable by default done here: https://crrev.com/c/4673258
ChromeStatus: https://chromestatus.com/feature/5134293578285056

Bug: 695592
Change-Id: I38c9633a19876be9439a55c043c365d77f457e6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4850763
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194179}
2023-09-08 16:50:11 +00:00
Chris Fredrickson
b854bbf9be Remove some usages of EXECUTE_SCRIPT_USE_MANUAL_REPLY under content/
Removing reliance on EXECUTE_SCRIPT_USE_MANUAL_REPLY forces the
JavaScript to be written in terms of promises, which makes the code
less bug-prone since double-sends are systematically prevented (see
https://crrev.com/c/4318742 for an example bug that would have been
prevented by this).

There are still more usages, especially under content/browser/webrtc,
but those removals are not as mechanical and will be attempted in
followups.

Bug: 1423407, 1422660
Change-Id: Ib8f153da50f0bd3e2d09e00615973264dc3214d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4332196
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1122508}
2023-03-27 17:27:44 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Bryant Chandler
82b28c487c [fuchsia] Disable browser_tests that use WebSQL
Disabling this until WebSQL is fully removed.

Bug: 1317431, 1271639
Change-Id: Idc1127e9493de60b2127dce366c4407be5abcdd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3848783
Reviewed-by: Fabrice de Gans <fdegans@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Bryant Chandler <bryantchandler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039416}
2022-08-25 20:38:31 +00:00
Fabrice de Gans
6029730ca1 [fuchsia] Disable WebSQL tests
WebSQL does not work on Fuchsia

Bug: 1317431
Change-Id: Id146e305430e38b76857af70ed900120ac602e12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3591858
Auto-Submit: Fabrice de Gans <fdegans@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#993651}
2022-04-19 11:18:22 +00:00
liberato@chromium.org
71bc140b83 [CodeHealth] Remove NOTIFICATION_LOAD_STOP from content_browsertests
This replaces all WindowedNotificationObserver for LOAD_STOP in
content_browsertests with a new helper class, LoadStopObserver, that
observes WebContents instead.

Bug: 1174764
Change-Id: I91c569a1f54e1a79037e3bf73027a46bbed57a15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3522589
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/main@{#980858}
2022-03-14 23:45:01 +00:00
Avi Drissman
c91bd8ea79 Migrate to ExecJs/EvalJs in content/
Bug: 1157718
Change-Id: Ibb5bdb3f994630cc2b84f4e60adaf307fe646cb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2826401
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874039}
2021-04-19 23:58:44 +00:00
Peter Kasting
919ce657e4 Add missing #includes of browser_test.h.
This is a step towards doing full IWYU of browser_test.h, which will
have other benefits.

Completely mechanical and already R+ed as part of r765923.

Tbr: sky
Bug: none
Change-Id: Icb7ab728098a6cf29c0920da4b524e96a7c024c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2186411
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766361}
2020-05-07 10:22:36 +00:00
Balazs Engedy
683d2c7a8f Revert "IWYU for browser_test.h."
This reverts commit 66a53c909a.

Reason for revert: Breaks compile on official branded builders.

Original change's description:
> IWYU for browser_test.h.
> 
> Include this directly in relevant test files.  This lets us convert the
> HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
> view_event_test_base.h into #errors, and force people to not even
> include this file in files that can't use it.
> 
> Bug: none
> Tbr: sky
> Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#765923}

TBR=sky@chromium.org,pkasting@chromium.org,thestig@chromium.org

Change-Id: I4583916602404c310a93f571dd2c78645c6bd567
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2184132
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765931}
2020-05-06 10:36:40 +00:00
Peter Kasting
66a53c909a IWYU for browser_test.h.
Include this directly in relevant test files.  This lets us convert the
HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
view_event_test_base.h into #errors, and force people to not even
include this file in files that can't use it.

Bug: none
Tbr: sky
Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765923}
2020-05-06 09:38:56 +00:00
Alex Moshchuk
aeb20fe347 Fix remaining NavigateToURL expectations in content_browsertests.
This is hopefully the last step before finally adding
WARN_UNUSED_RESULT to NavigateToURL().

Apart from adding straightforward expectations for regular and redirect
cases, this fixes a couple more bugs:

- AppendingFrameInWebUIDoesNotCrash was broken on Android, because it
  used chrome://tracing, which doesn't exist on Android.

- A couple of tests in WebContentsImplBrowserTest (e.g.,
  ChangeDisplayMode) were navigating to about://blank (instead of
  about:blank), which results in an error rather than a blank page.

Bug: 425335
Change-Id: Id80040de9c3383c517f2df95b819f314e6b29f30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819852
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699854}
2019-09-25 17:40:01 +00:00
Raul Tambre
6c0c3f5b8b //content: Convert base::(U)Int(64)ToString(16) to NumberToString(16)
The former non-overloaded variants are deprecated.
Removed casts where they are now unnecessary.

This is a mechanical change; there is no intended behavior change.

Change-Id: I22afe243411e92a7051072724745eaad5234f18b
Reviewed-on: https://chromium-review.googlesource.com/c/1451843
Commit-Queue: Raul Tambre <raul@tambre.ee>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628781}
2019-02-04 17:44:17 +00:00
nick
adef4a59be Extend the ToRenderFrameHost magic to FrameTreeNode* and Shell*.
BUG=None
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2052633002
Cr-Commit-Position: refs/heads/master@{#398964}
2016-06-09 18:47:58 +00:00
xunjieli
0332c191aa Move url_request_mock_http_job to net/test/url_request/
This CL is a part of the effort to move mock URLRequestJob files
from content/test/net to net/test/url_request/. The reason for this
refactoring is that Cronet will need to use these classes for testing,
so it will be nice if they can be in net/test, as the dependency can
work out nicely.

BUG=

Review URL: https://codereview.chromium.org/541743002

Cr-Commit-Position: refs/heads/master@{#294255}
2014-09-10 23:25:48 +00:00
jam@chromium.org
6e9def1ccf Move ContentBrowserTest class to content/public, since it's used by components_browsertests for browser tests which use Content Shell.
R=avi@chromium.org

Review URL: https://codereview.chromium.org/214823006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259967 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-27 20:23:28 +00:00
jochen@chromium.org
de7d61ff0d [content shell] move browser process stuff into browser/ subdir
BUG=180021
R=marja@chromium.org
TBR=joi@chromium.org,ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23316003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218441 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-20 11:30:41 +00:00
avi@chromium.org
10994d13b7 Use a direct include of strings headers in content/browser/, part 1.
BUG=247723
TEST=none
TBR=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16755004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205449 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-11 07:16:18 +00:00
avi@chromium.org
74ebfb1e11 Use a direct include of utf_string_conversions.h in content/.
BUG=none
TEST=none
TBR=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16408017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204917 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-07 20:48:00 +00:00
dcheng@chromium.org
007b3f812f Rewrite std::string("") to std::string(), Linux edition.
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.

BUG=none

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020

Review URL: https://codereview.chromium.org/13145003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-09 08:46:45 +00:00
dcheng@chromium.org
69d7f89d6a Revert "Rewrite std::string("") to std::string(), Linux edition."
This reverts commit e59558b78e.

Revert "Fix build after r193020."

This reverts commit 558a35897f.

Revert "Really fix build after r193020."

This reverts commit e3748a79b5.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-09 06:41:12 +00:00
dcheng@chromium.org
e59558b78e Rewrite std::string("") to std::string(), Linux edition.
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.

BUG=none

Review URL: https://codereview.chromium.org/13145003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
2013-04-09 05:45:17 +00:00
darin@chromium.org
b6987e0e55 Simplify ExecuteJavaScript* functions.
Remove the "Java" and rename to ExecuteScript*.  This better matches
conventions elsewhere in the codebase.

Introduce ExecuteScriptInFrame* variants for the less common case
where script execution in a subframe is desired.

Make it possible to pass the ExecuteScript* family of functions either
a WebContents pointer or a RenderViewHost pointer to further simplify
callsites.

R=jam@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11753009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175156 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-04 18:30:43 +00:00
darin@chromium.org
06bc5d9a46 Change ExecuteJavaScript* helper functions in browser_test_utils.{h,cc}
to take std::string (UTF-8) instead of std::wstring.  This seems to help
simplify callsites considerably.

TBR=jam@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11728003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174880 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-02 22:44:13 +00:00
jam@chromium.org
464883218e Move remaining files in content\browser to the content namespace.
Review URL: https://codereview.chromium.org/11340029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164828 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-30 03:22:20 +00:00
jam@chromium.org
81702c8c3e Convert the Web SQL Database pyauto test to content_browsertests.
BUG=143637
Review URL: https://chromiumcodereview.appspot.com/10879018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152821 0039d316-1c4b-4281-b951-d872f2087c98
2012-08-22 21:44:07 +00:00