0
Commit Graph

54 Commits

Author SHA1 Message Date
Lukasz Anforowicz
0339afd627 Introducing mojo::DataPipeProducedHandle::WriteAllData method.
The new method offers a more ergonomic alternative to using
`MOJO_WRITE_DATA_FLAG_ALL_OR_NONE`.  For more details and discussion
please see
https://docs.google.com/document/d/1c4NKpXwpQ9MKK1SbJ4C6MvhXI8-KJZ4jq7N4VHTHJoI/edit#heading=h.ti2k549mrv1h

Bug: 40284755
Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5646444
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1318748}
2024-06-24 19:57:19 +00:00
Lukasz Anforowicz
2a672e3b88 span-ify mojo/.../data_pipe.h: Migrate content/browser.
`span`-ification: `mojo::DataPipe[Consumer|Producer]Handle`: Migrating
callers.  This CL `span`-ifies the callers of the APIs in
`mojo/public/cpp/system/data_pipe.h`:

* `BeginReadData` and `BeginWriteData` return (via an out parameter)
  a `span` instead of returning a ptr+size pair.
* `ReadData` and `WriteData` consume a `span` instead of consuming
  a ptr+size pair.

For more details see the design note here:
https://docs.google.com/document/d/1c4NKpXwpQ9MKK1SbJ4C6MvhXI8-KJZ4jq7N4VHTHJoI/edit?usp=sharing

This CL was uploaded by git cl split.

R=alexrudenko@chromium.org, ayui@chromium.org, behamilton@google.com, boliu@chromium.org, dmurph@chromium.org, evliu@google.com, greengrape@google.com, horo@chromium.org, isaboori@google.com, jonross@chromium.org, kouhei@chromium.org, qinmin@chromium.org, wanderview@chromium.org

Bug: 40284755
Change-Id: I4f088bc02c50106fbae7858373af55aaf4879f1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5619250
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Evan Liu <evliu@google.com>
Cr-Commit-Position: refs/heads/main@{#1315319}
2024-06-14 17:27:49 +00:00
Lukasz Anforowicz
90a924998c size_t in mojo::DataPipe[Consumer|Producer]Handle: Migrate //content
This CL makes use of the new `size_t`-based APIs in `//content`.
See https://crrev.com/c/5414148 for motivation.

This CL may have introduced new integer conversions - in those cases the
CL attempts to have well-defined behavior (e.g. using
`base::checked_cast`).  OTOH, this CL did *not* attempt to fix old
integer operations (e.g. old `int` => `uint32_t` / `size_t` conversions,
or old additions that may potentially overflow).

Bug: 40284755
Change-Id: Id1d3c2b863cf524d1132346aed7e330bc3509688
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5416894
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1286002}
2024-04-11 18:49:57 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +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
Leszek Swirski
154cddb1a0 [loader] Send cached metadata as part of OnReceiveResponse
CachedMetadata is an opaque data blob optionally stored alongside
responses in the response cache. It stores data specific to the
response -- in particular, for JavaScript files it will store the V8
code cache. Before this patch, CachedMetadata was sent to the renderer
using a separate OnReceiveCachedMetadata message, after
OnReceiveResponse.

This mechanism is only used by the Service Worker installed resources; in the HTTP cache case, there is a separate "isolated code cache"
which is queried at the same time as the HTTP cache and the two
requests are synchronised (cf. https://crbug.com/812168). This means
that, before this patch, HTTP code caches were received at the same
time as the body (thanks to the synchronisation), but Service Worker code caches were received _after_ the body (which is sent as part of
OnReceiveResponse). The consequence was that Service Worker code
caches were dropped in favour of (re)parsing the script response body,
as that parse was started before the CachedMetadata was received.

Now, rather than a separate OnReceiveCachedMetadata, send an optional
CachedMetadata alongside the headers and body in OnReceiveResponse.
This allows the receiver of the response to more carefully interleave
dealing with the metadata and body.

Review note: Since the Service Worker is the only user of this API, the
interesting parts of this patch are the handling of service worker
and the changes in the Blink UrlLoaderClient. Unfortunately, there are
other implementers of the UrlLoaderClient interface which either
ignore or trivially pass through the cached metadata, and the
signature change of the OnReceiveResponse method makes this CL
impossible to split by subdirectory for these trivial changes.

Bug: 1350077
Change-Id: I43cce62bf573691247cb8ccc362a4b73541185a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3811219
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Josh Simmons <simmonsjosh@google.com>
Cr-Commit-Position: refs/heads/main@{#1040492}
2022-08-29 17:57:19 +00:00
John Abd-El-Malek
0e47fede6c Remove URLLoaderClient::OnStartLoadingResponseBody.
Bug: 1017710
Change-Id: I9d4c25285f277a3558c1a28aec9f5db5002d4286
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3639362
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1003785}
2022-05-16 16:29:00 +00:00
John Abd-El-Malek
2e0de59554 Combine URLLoaderClient OnReceiveResponse and OnStartLoadingResponseBody.
These may have needed to be separate before, but not anymore. Add a
feature flag to enable this so we can measure performance and disable if
we see any issues.

OnReceiveResponse now takes an optional data pipe that is only sent if
the feature is enabled. URLLoaderClients don't check the feature, and
instead use the data pipe if it's available earlier. The main producer
to update is the network service's URLLoader implementation. For
simplicity I didn't update all the other producers since most don't
affect performance and the clients handle both cases. I additionally
only updated service worker, extensions, WebUI and blobs.

Bug: 1017710

Change-Id: Icc85fa781dac7951fabcc1d82220630dd374f6b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3410912
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#962758}
2022-01-25 00:12:35 +00:00
Robert Sesek
76af669b5f Move from mojo::DataPipe to mojo::CreateDataPipe in //content
The DataPipe constructor has no way to check for errors if creation
fails, so it CHECKs and crashes. CreateDataPipe offers a way to check
the return value.

Bug: 944990
Change-Id: I55a32566d62406f6c5bc34a8571bfced82d0aa1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657352
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848702}
2021-01-29 20:57:23 +00:00
Hiroki Nakagawa
e196d712d3 NoStatePrefetch: Rename PrerendererClient to NoStatePrefetchClient
Change-Id: I1e7c49eac75295452149f2e41b290736b8f7e298
Bug: 1144577
Tbr: blundell@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586177
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836562}
2020-12-14 09:50:10 +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
Lucas Furukawa Gadani
b867478b57 Convert content/ to use URLResponseHead mojom type.
Bug: 984550
Change-Id: If4ab87583699d97a9c0b06bfdcdf4fbba720eee4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1953523
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723842}
2019-12-11 16:22:58 +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
David Benjamin
1384c0407d Switch AssembleRawHeaders to taking a StringPiece.
This is just one function, but it has a *ton* of callers, so
lots of things need fixing. While I'm here, switch bare new
to base::MakeRefCounted.

Bug: 820198
Change-Id: I41d6ec2d5c4e2733ba8116d0d2e6e7bd26620ea0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574646
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Eric Roman <eroman@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654950}
2019-04-29 18:55:52 +00:00
Sebastien Marchand
f8cbfab434 Include base/bind.h in the files that use it (in //content).
Gab, I've used your refactoring script for this, the rule is:
  matches = re.compile(r'(\n *[^/\n][^/\n]*base::Bind(Once|Repeating)?\b[^*])', re.DOTALL).findall(content)

  if not matches:
    return False

  updated_content = refactor_lib.AddInclude(file_path, content, "base/bind.h")

  if updated_content == content:
    return False

  # Write updated file
  refactor_lib.WriteFile(file_path, updated_content)

TBR=gab@chromium.org

Change-Id: I6cca9dff7fa4937fd7accdc57fe774674f6c147b
Reviewed-on: https://chromium-review.googlesource.com/c/1437100
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626088}
2019-01-25 16:02:30 +00:00
Kent Tamura
21d1de6269 Remove "layouttest" or "layout test" in //content
They are renamed to "webtest" or "web test".
This CL has no behavior changes.

TBR=caitkp@chromium.org, mkwst@chromium.org

Bug: 843412
Change-Id: Ifdd22e1bfd10e727e17c2035b3faf1ae4fec1400
Reviewed-on: https://chromium-review.googlesource.com/c/1367391
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615044}
2018-12-10 04:45:20 +00:00
Clark DuVall
3528b5502f Convert WebKitBrowserTest to use URLLoaderInterceptor
This test was using a net::URLRequestInterceptor so was not actually
working correctly with network service. The interceptor it was using
also assumes it is on the IO thread which was causing issues when
running NS in-process on its own thread.

Bug: 908993
Change-Id: I009ddf13b53cecac9615c4d2019405ddede57c69
Reviewed-on: https://chromium-review.googlesource.com/c/1357405
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612879}
2018-12-01 00:47:36 +00:00
svaldez
c3a9a1736c Migrating tests to use EmbeddedTestServer (/content)
- Moving tests to use EmbeddedTestServer where possible.
- net::test_server::EmbeddedTestServer references to net::EmbeddedTestServer
- Using server.Start() instead of server.InitializeAndWaitUntilReady()
- Renaming test_server() to be spawned_test_server() or embedded_test_server()
- Enabling tests disabled due to SpawnedTestServer compatibility

BUG=496825

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

Cr-Commit-Position: refs/heads/master@{#357645}
2015-11-03 22:02:34 +00:00
tfarina
586674b4c3 content: Rename DumpRenderTree references to test_runner.
DumpRenderTree is gone, so now content_shell with --run-layout-test or
test_runner has taken its place.

BUG=None
R=avi@chromium.org,tkent@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#353668}
2015-10-13 03:21:19 +00:00
abarth@chromium.org
29354a78ad Remove tests for showModalDialog
This deletes the chromium-side tests for showModalDialog. We're about to disable
this feature from the Blink side, which would otherwise break these tests. The
plan is to leave the implementation behind a flag for a release or two in case
we need to restore the feature on short notice.

This CL is a partial re-land of https://codereview.chromium.org/165793003.

R=darin@chromium.org
BUG=345831

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265711 0039d316-1c4b-4281-b951-d872f2087c98
2014-04-23 19:49:20 +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
jamesr@chromium.org
dd48d49862 Revert 252883 "Remove tests and code for showModalDialog"
We're leaving this in for M35.

> Remove tests and code for showModalDialog
>
> This deletes the chromium-side implementation logic and a few tests for
> showModalDialog. I believe more simplification is possible to do without the
> design constraints imposed by showModalDialog but we should probably start
> small in case we run into unexpected compat issues.
>
> R=darin
> BUG=345831
>
> Review URL: https://codereview.chromium.org/165793003

TBR=jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257356 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-16 05:04:39 +00:00
jamesr@chromium.org
5bf17606ed Revert 252889 "Revert 252883 "Remove tests and code for showModa..."
Layout test failures are expected and suppressed on the blink side.

> Revert 252883 "Remove tests and code for showModalDialog"
> 
> This CL broke show-modal-dialog tests in Blink.
> http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&tests=fast/dom/Window/open-window-min-size.html,fast/events/scroll-event-during-modal-dialog.html,fast/events/show-modal-dialog-onblur-onfocus.html,fast/harness/show-modal-dialog.html
> 
> > Remove tests and code for showModalDialog
> > 
> > This deletes the chromium-side implementation logic and a few tests for
> > showModalDialog. I believe more simplification is possible to do without the
> > design constraints imposed by showModalDialog but we should probably start
> > small in case we run into unexpected compat issues.
> > 
> > R=darin
> > BUG=345831
> > 
> > Review URL: https://codereview.chromium.org/165793003
> 
> TBR=jamesr@chromium.org
> 
> Review URL: https://codereview.chromium.org/177263002

TBR=haraken@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252989 0039d316-1c4b-4281-b951-d872f2087c98
2014-02-24 21:47:26 +00:00
haraken@chromium.org
9187f728e1 Revert 252883 "Remove tests and code for showModalDialog"
This CL broke show-modal-dialog tests in Blink.
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&tests=fast/dom/Window/open-window-min-size.html,fast/events/scroll-event-during-modal-dialog.html,fast/events/show-modal-dialog-onblur-onfocus.html,fast/harness/show-modal-dialog.html

> Remove tests and code for showModalDialog
> 
> This deletes the chromium-side implementation logic and a few tests for
> showModalDialog. I believe more simplification is possible to do without the
> design constraints imposed by showModalDialog but we should probably start
> small in case we run into unexpected compat issues.
> 
> R=darin
> BUG=345831
> 
> Review URL: https://codereview.chromium.org/165793003

TBR=jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252889 0039d316-1c4b-4281-b951-d872f2087c98
2014-02-24 07:49:45 +00:00
jamesr@chromium.org
431edfd760 Remove tests and code for showModalDialog
This deletes the chromium-side implementation logic and a few tests for
showModalDialog. I believe more simplification is possible to do without the
design constraints imposed by showModalDialog but we should probably start
small in case we run into unexpected compat issues.

R=darin
BUG=345831

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252883 0039d316-1c4b-4281-b951-d872f2087c98
2014-02-24 05:58:31 +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
gavinp@chromium.org
5d7dc5133c Protect WebURLLoaderImpl::Context while receiving responses.
A client's didReceiveResponse can cancel a request; by protecting the
Context we avoid a use after free in this case.

Interestingly, we really had very good warning about this problem, see 
https://codereview.chromium.org/11900002/ back in January.

R=darin
BUG=241139

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203935 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-04 12:35:53 +00:00
hashimoto@chromium.org
d844b25778 Revert 202821 "Protect WebURLLoaderImpl::Context while receiving..."
> Protect WebURLLoaderImpl::Context while receiving responses.
> 
> A client's didReceiveResponse can cancel a request; by protecting the
> Context we avoid a use after free in this case.
> 
> Interestingly, we really had very good warning about this problem, see 
> https://codereview.chromium.org/11900002/ back in January.
> 
> R=darin
> BUG=241139
> 
> Review URL: https://chromiumcodereview.appspot.com/15738007

TBR=gavinp@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202835 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-29 11:25:27 +00:00
gavinp@chromium.org
370bd9b522 Protect WebURLLoaderImpl::Context while receiving responses.
A client's didReceiveResponse can cancel a request; by protecting the
Context we avoid a use after free in this case.

Interestingly, we really had very good warning about this problem, see 
https://codereview.chromium.org/11900002/ back in January.

R=darin
BUG=241139

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202821 0039d316-1c4b-4281-b951-d872f2087c98
2013-05-29 08:26:06 +00:00
dubroy@chromium.org
42dfa3a3ea Revert 176882 - Test fails on Win Aura.
> Test that 404 subresource bodies with nested message loops don't crash.
> 
> This is a browser test because DumpRenderTree doesn't run nested message loops. The failure case was that a nested message triggered from an element that has signalled an error but had an open request would receive a body for the request and crash/fail an assertion.
> 
> This test checks the WebKit side fix for this issue, see https://bugs.webkit.org/show_bug.cgi?id=103563
> 
> R=sky@chromium.org
> 
> Review URL: https://chromiumcodereview.appspot.com/11778083

TBR=gavinp@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176897 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-15 13:58:14 +00:00
gavinp@chromium.org
9d4e5ace82 Test that 404 subresource bodies with nested message loops don't crash.
This is a browser test because DumpRenderTree doesn't run nested message loops. The failure case was that a nested message triggered from an element that has signalled an error but had an open request would receive a body for the request and crash/fail an assertion.

This test checks the WebKit side fix for this issue, see https://bugs.webkit.org/show_bug.cgi?id=103563

R=sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176882 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-15 11:16:21 +00:00
gavinp@chromium.org
76ab62b152 New WebKitBrowserTest for content_shell not providing a prerenderer client.
The content_shell doesn't provide a prerendererclient (and chromium and DumpRenderTree do). This browsertest makes sure that encountering a prerendering element doesn't crash the content_shell.

This patch must land after https://bugs.webkit.org/show_bug.cgi?id=95036 lands and is gardened into Chromium.

R=jam@chromium.org
BUG=144556

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153596 0039d316-1c4b-4281-b951-d872f2087c98
2012-08-28 00:44:29 +00:00
jam@chromium.org
32d8caf6fe Move a number of other tests from browser_tests to content_browsertests.
BUG=90448
Review URL: https://chromiumcodereview.appspot.com/10821037

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148558 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-26 16:09:46 +00:00
ben@chromium.org
52877dbc6c Move tab functions off Browser into browser_tabstrip and browser_tabrestore.
http://crbug.com/133576
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10702029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145015 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-29 22:22:03 +00:00
avi@chromium.org
1e23ec07b4 TabContentsWrapper -> TabContents, part 57.
That's really all.

BUG=131026
TEST=no change

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141971 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-13 21:06:51 +00:00
avi@chromium.org
93ddb3c682 TabContents -> WebContentsImpl, part 7.
Move the WebContentsImpl class to files in web_contents.

BUG=105875
TEST=no change


Review URL: http://codereview.chromium.org/10054012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131845 0039d316-1c4b-4281-b951-d872f2087c98
2012-04-11 21:44:29 +00:00
jam@chromium.org
179bccff23 Commit two files that I missed in 126165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126170 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-12 18:12:57 +00:00
jam@chromium.org
4ca153033f Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've converted the easy ones, I'll do the ones with more dependencies in a separate change to keep things trivial to review.
I considered taking out GetSelectedTabContents altogether and having people just use GetSelectedTabContentsWrapper()->web_contents() per the existing comment in browser.h, but there are a lot of callers and it seemed too long to type.

BUG=98716
TBR=joi
Review URL: http://codereview.chromium.org/9015022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116122 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-03 05:53:20 +00:00
jam@chromium.org
be1f56ab53 Move a bunch of methods from TabContents into the WebContents interface. This change either moves CamelCase functions into the interface, or renames existing unix_hacker functions to CamelCase.
BUG=98716
Review URL: http://codereview.chromium.org/8949061

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115495 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-22 06:55:31 +00:00
japhet@chromium.org
72e745b8e1 Enable WebKitBrowserTest.XsltBadImport
BUG=104582
TEST=WebKitBrowserTest.XsltBadImport

Review URL: http://codereview.chromium.org/8664002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111779 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-28 21:58:21 +00:00
steveblock@chromium.org
e548a7852b Disable failing WebKitBrowserTest.XsltBadImport on Mac after WebKit roll
BUG=104582

Review URL: http://codereview.chromium.org/8591020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110509 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-17 16:40:14 +00:00
steveblock@chromium.org
34c2659ee2 Disable failing WebKitBrowserTest.XsltBadImport on Linux after WebKit roll
BUG=104582

Review URL: http://codereview.chromium.org/8588031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110488 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-17 12:31:34 +00:00
thestig@chromium.org
7a4aeddc9d Disable failing test after the recent WebKit roll.
BUG=104582
TEST=bots go green
TBR=japhet
Review URL: http://codereview.chromium.org/8588022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110431 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-17 04:43:28 +00:00
gavinp@chromium.org
090e47de4a new webkit_browsertest for crbug.com/103058
Unfortunately, I haven't been able to reproduce bug 103058 very well
in WebKit's LayoutTest engine, because DumpRenderTree's libraries interfere with
resource lifetime; a browser_test doesn't have this issue, so it's able to
act as a good regression test for this issue.

BUG=103058


Review URL: http://codereview.chromium.org/8531002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110321 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-16 17:54:49 +00:00
gavinp@chromium.org
4b6c04e2b6 Add a browsertest for bug 75604
This browser test tickles the webkit bug described in crbug.com/75604 .
The bug is very hard to repliably reproduce in a layout test, so my plan is
to land this browser_test, update webkit to fix the bug, and update this
test as we garden past the fix.

BUG=75604

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107949

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108864

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108868

Review URL: http://codereview.chromium.org/8404001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108878 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-07 17:03:57 +00:00
gavinp@chromium.org
7d53ec9211 Revert 108868 - Add a browsertest for bug 75604
This browser test tickles the webkit bug described in crbug.com/75604 .
The bug is very hard to repliably reproduce in a layout test, so my plan is
to land this browser_test, update webkit to fix the bug, and update this
test as we garden past the fix.

BUG=75604

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107949

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108864

Review URL: http://codereview.chromium.org/8404001

TBR=gavinp@chromium.org
Review URL: http://codereview.chromium.org/8494011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108870 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-07 15:49:38 +00:00
gavinp@chromium.org
f00c299976 Add a browsertest for bug 75604
This browser test tickles the webkit bug described in crbug.com/75604 .
The bug is very hard to repliably reproduce in a layout test, so my plan is
to land this browser_test, update webkit to fix the bug, and update this
test as we garden past the fix.

BUG=75604

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107949

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108864

Review URL: http://codereview.chromium.org/8404001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108868 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-07 15:42:54 +00:00