WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#32666 closed defect (bug) (fixed)

QUnit tests notice

Reported by: netweb Owned by: westonruter
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.1
Component: Customize Keywords: has-patch
Focuses: Cc:
PR Number:

Description

When running grunt qunit or grunt precommit etc the following error is displayed:

XMLHttpRequest cannot load http://example.org/. Origin file:// is not allowed by Access-Control-Allow-Origin.

Attachments (1)

32666.diff (468 bytes) - added by westonruter 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @netweb
4 years ago

  • Owner set to iseulde
  • Status changed from new to assigned

#2 @iseulde
4 years ago

  • Component changed from Build/Test Tools to Customize
  • Owner changed from iseulde to westonruter
  • Version changed from trunk to 4.1

This is caused by the customizer tests. Looks like this was introduced in [30919].

#3 @obenland
4 years ago

@westonruter could you take a look at this when you get a chance?

@westonruter
4 years ago

#4 @westonruter
4 years ago

  • Keywords has-patch added; needs-patch removed

OK, I have one approach in 32666.diff. The issue is that the customize-settings.js fixture uses example.org in the wp.customize.settings.url settings. The Customizer is trying to load the content for the Customizer Preview. So the quick solution is to just cancel the Ajax request entirely. This eliminates the XHR warning. Thoughts?

#5 @westonruter
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 33120:

Customizer: Prevent preview from loading during QUnit tests and causing an XHR cross-domain error.

Fixes #32666.

Note: See TracTickets for help on using tickets.