Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32666 closed defect (bug) (fixed)

QUnit tests notice

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

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 11 years ago.

Download all attachments as: .zip

Change History (6)

#1 @netweb
11 years ago

  • Owner set to iseulde
  • Status newassigned

#2 @iseulde
11 years ago

  • Component Build/Test ToolsCustomize
  • Owner changed from iseulde to westonruter
  • Version trunk4.1

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

#3 @obenland
11 years ago

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

@westonruter
11 years ago

#4 @westonruter
11 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
11 years ago

  • Resolutionfixed
  • Status assignedclosed

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.